michalmuskala / time_format

Fast date/time formatting for elixir
7 stars 3 forks source link

Support %h %j %u %U %V %w %W %Z, and tests #4

Closed martinsvalin closed 6 years ago

martinsvalin commented 6 years ago

I implemented these:

I added tests for all supported format codes. I've kept tests simple so far, with only a few additional examples to help me get week numbers right.

martinsvalin commented 6 years ago

The test failure is on calling Calendar.ISO.date_to_iso_days/3 (in wday) on 1.5.x, where it was called Calendar.ISO.date_to_iso_days_days/3 (Note the extra _days). Both new and old have @doc false.

Calling :calendar.date_to_gregorian_days/3 as I did for year_day is one way to deal with it. Whatever we end up doing, we should call the same function in both places.

michalmuskala commented 6 years ago

Thank you! :heart: