maennchen / crontab

:alarm_clock: Parse Cron Expressions, Compose Cron Expression Strings and Caluclate Execution Dates.
https://hex.pm/packages/crontab
MIT License
93 stars 33 forks source link

how exactly this cron parser is working here? #81

Closed siddhant3030 closed 3 years ago

siddhant3030 commented 3 years ago

I have tried to import Crontab.CronExpression

Then in iex shell I used this command to parse the corn expression

Crontab.CronExpression.Parser.parse (" MON-TUE")

But this giving me this output {:ok, ~e[ 1-2 *]}

Crontab.CronExpression.Parser.parse "* * * * *"
{:ok,
  %Crontab.CronExpression{day: [:*], hour: [:*], minute: [:*],
  month: [:*], weekday: [:*], year: [:*]}}

How this example is working?