Closed jbfaden closed 2 years ago
The date command supports week-of-year, so I suggest:
date +%Y-W%W-%w
2022-W10-6
some care is needed because there is also %V:
spot8> date -d 2022-01-01 +%Y-W%V-%w
2022-W52-6
spot8> date -d 2022-01-01 +%Y-W%W-%w
2022-W00-6
spot8> date -d 2021-12-31 +%Y-W%W-%w
2021-W52-5
The ISO8601 standard has no week 0.
The iso8601 parser hasn't ever supported week-of-year and I needed it for some application. I just realized I put the code in but the change was never documented in a ticket.
So TimeUtil.java the following now parses:
See https://github.com/autoplot/dev/blob/master/demos/2022/20220312/demotimeWeek.jy