I was in need of week-of-year procs but couldn't find any so I wrote them. Putting them here for now because they aren't librarified enough yet to be packaged- no unit tests or docs yet.
https://play.nim-lang.org/#ix=2lN4
Implements algorithms adapted from: https://en.wikipedia.org/wiki/ISO_week_date#Calculating_the_week_number_from_a_month_and_day_of_the_month_or_ordinal_date
yearweek values (week-of-year value) correspond to ISO 8601 week value minus 1, similar to how day-of-year and day-of-week are handled in the times module.
Hope this is useful!
I like this I have weekday, but I don't have week of the year in my library, I should add it.
https://github.com/treeform/chrono/blob/master/src/chrono/calendars.nim#L224
+1
Please include this as part of the times
... aaaand we got merged, it's in times! Thanks to all who gave feedback in the review process! The API actually got a lot better.