Commit 653cbd2f authored by xa's avatar xa

cleanup

parent c47e4a50
Pipeline #1226 passed with stages
in 39 seconds
defmodule Duration.Parser do
import NimbleParsec
import Duration.Parser.Helpers
defparsec(:foo, year(), debug: true)
# defparsec(:date_1, year |> month |> day, debug: true)
# defparsec(:date_2, year |> ignore(dash) |> month |> ignore(dash) |> day, debug: true)
# defparsec(
# :date_3,
# optional(part("Y", :years)) |> optional(part("M", :months)) |> optional(part("D", :days))
# )
# defparsec(:time_1, hour |> minute |> second, debug: true)
# defparsec(:time_2, hour |> ignore(colon) |> minute |> ignore(colon) |> second, debug: true)
# defparsec(
# :time_3,
# optional(part("H", :hours)) |> optional(part("M", :minutes)) |> optional(part("S", :seconds))
# )
# defparsec(
# :datetime_1,
# marker_p |> parsec(:date_1) |> optional(marker_t |> parsec(:time_1)) |> eos()
# )
# defparsec(
# :datetime_2,
# marker_p |> parsec(:date_2) |> optional(marker_t |> parsec(:time_2)) |> eos()
# )
# defparsec(
# :datetime_3,
# marker_p |> parsec(:date_3) |> optional(marker_t |> parsec(:time_3)) |> eos()
# )
# defparsec(:parse, choice([parsec(:datetime_1), parsec(:datetime_2), parsec(:datetime_3)]),
# debug: true
# )
end
......@@ -40,7 +40,7 @@ defmodule Duration.MixProject do
[
name: "duration",
licenses: ["BSD-3-Clause"],
# links: %{"GitHub" => "https://github.com/elixir-ecto/postgrex"}
links: %{"Errorist" => "https://lab.errorist.xyz/elixir/duration"}
]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment