D3 Time Format Skips Isoweek
When using d3.time.format(%Y%W) it doesn't give the expected output. d3.time.format('%Y%W').parse('201553') outputs Mon Jan 04 2016 Although the first Monday of week number 53 in
Solution 1:
The number of weeks is zero-based. d3.time.format
defines a week number that is different from ISO 8601.
Check the documentation: https://github.com/d3/d3/wiki/Time-Formatting
%W - week number of the year (Monday as the first day of the week) as a decimal number [00,53].
It's the same for %U
:
%U - week number of the year (Sunday as the first day of the week) as a decimal number [00,53].
Post a Comment for "D3 Time Format Skips Isoweek"