Skip to content
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

ISO week number (%V) #8

Closed
mbostock opened this issue Oct 21, 2015 · 4 comments · Fixed by #37
Closed

ISO week number (%V) #8

mbostock opened this issue Oct 21, 2015 · 4 comments · Fixed by #37

Comments

@mbostock
Copy link
Member

From http://man7.org/linux/man-pages/man3/strftime.3.html:

The ISO 8601 week number (see NOTES) of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year.

And:

%G, %g, and %V yield values calculated from the week-based year defined by the ISO 8601 standard. In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; or, the week that has 4 January in it). When three of fewer days of the first calendar week of the new year fall within that year, then the ISO 8601 week-based system counts those days as part of week 53 of the preceding year. For example, 1 January 2010 is a Friday, meaning that just three days of that calendar week fall in 2010. Thus, the ISO 8601 week-based system considers these days to be part of week 53 (%V) of the year 2009 (%G); week 01 of ISO 8601 year 2010 starts on Monday, 4 January 2010.

Related d3/d3#2151.

Also note that #7 (d3/d3#1811) proposes using %V for the signed year, but it seems like consistency with strftime is preferable.

@barrybecker4
Copy link

We are also looking for this feature. Will it be available only in version 4.0?

@mbostock
Copy link
Member Author

I have no immediate plans to implement this for 4.0, but if I were to implement it, it would only be for 4.0, yes.

@BrianMitchL
Copy link
Contributor

I would like to use this feature, are there any updates on the status of this?

@mbostock
Copy link
Member Author

No; if there were an update, it would be above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants