Lowercase month name not parseable
- Dominant language
- Elixir
- Stars
- 1.8k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
### Steps to reproduce
```elixir
> Timex.parse("march", "{Mfull}")
{:error, "Expected `full month name` at line 1, column 6."}
> Timex.parse("mar", "{Mshort}")
{:error, "Expected `month abbreviation` at line 1, column 4."}
```
### Description of issue
It's surprising that this fails due to the names being completely lowercased. We first discovered this issue while attempting to parse a date with an uppercase month (like "17-DEC-2024"), realised there is no support for that in the parser, but noticed that lowercase is supported by `Timex.month_to_num`:
```
> Timex.month_to_num("MAR")
{:error, :invalid_month_name}
> Timex.month_to_num("mar")
3
```
But this doesn't work in the parser. I would likely be able to contribute if a PR to update this is acceptable?
Thanks!
Andrew
Contributor guide
Assessment
This issue has not been assessed yet.