Closed HaskellZhangSong closed 6 years ago
Looks like this is (semi) fixed now? (Looking at 0.5.0
).
=> (def date (time/date-time 2017))
=> (def format (time-format/formatter "xxxx'W'ww"))
=> (time-format/unparse format date)
"2016W52"
Running it on the full format string "xxxx'W'wwe'T'HHmmssZ"
generates an exception starting with #object[Error Error: No matching clause: e]
etc. But this might be related to #116 ?
according to https://en.wikipedia.org/wiki/ISO_8601#Week_dates
the week day of 20170101 should belong to the last week of previous year. so the result should actually be 2016W520T000000Z.
And the format does not seem to accept single 'w' character for week number of a year to remove prefix 0. Although this is not in ISO 8601, clj-time and other date-related package of other languages support this.