New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented ISO 8601 %V directive in time format #2151
Conversation
- %V now works as expected. - Added tests. - Added tests for %W.
- %V now works as expected. - Added tests. - Added tests for %W.
…cted. - Compliant to ISO 8601 - Added tests for week 53, year rolling.
Conflicts: src/start.js
Conflicts: d3.js d3.min.js src/start.js
Hi. I was wondering if you plan to give me feedback over this pull request. We use d3 in our product and are very motivated to contribute to the project by fixing issues / adding features directly to the library when appropriate. So I signed the contributor form and I tried to follow as close a possible to the library standards. Is there additional steps I could take to make this merged in the library ? Thanks ! |
👍 This would be a nice feature, as I am using ISO week numbers in tickFormat for some graphs, and starting at zero makes no sense... |
# Conflicts: # d3.min.js
Merged back master into my branch, and resolved the conflict. Had to fix the bin/component file that was referencing a non-existent attribute. Also, there is a test that fails in mbostock/master so it fail in my branch as well. |
Filed d3/d3-time-format#8. |
I am developing with d3 v4.9.1, can I ask if this very helpful feature of ISO Week numbers is available to me please? If I try and format my ticks using |
I have implemented the %V directive as defined in the documentation of strftime. It is following the ISO 8601 standard and it works for formatting and parsing. I also added tests for corner cases like the 2009 year that has 53 weeks.
Parsing note: If you parse something like this : "Fri 53 2009", it yield a date in 2010 since week 53 span over the next yea. Same thing, if you parse "Wed 01 2009", it yield a date in 2008 since week 1 start in previous year.