-
Notifications
You must be signed in to change notification settings - Fork 1
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
Wrong week number. Today (3 January 2017) it emits week 0. #3
Comments
Yeah, and this week is week 11, not 10 … 😐 |
The starting day of week 1 is sometimes confusing. According to MySQL function |
ISO 8601 defines the first week as the week with the first Thursday in it. The first Thursday in 2018 would be January 4. That makes the current week (the one with January 25 in it) the 4th week of the year. This package reports today as being in week 3. If the package does not intend to follow ISO 8601 to determine which week it is, then I suggest that at least be documented in the README to avoid further confusion. |
@sindrenm You are right! const dafo = require("dafo");
dafo.getWeekOfYear(new Date(2018, 0, 25), /* mode */ 3);
// RETURN 4 And with mode 0 or 2, it returns 3. |
Yep, |
This is a Free and Open Source software project, maintained by myself and other devs in their free time. Don't make comments that are explicitly intended to make someone feel guilty and obligated to respond to you in an expedient way. I usually block people for making divisive or manipulative comments, but since this project does not have a contributing guide I'll give you a warning. |
Sorry, @jonschlinkert, it was not meant in such a way at all. It was meant as a friendly question, but I understand how it might have come out as a bit snarky. I am grateful for the project and contribution to OSS. After all, I was using your package, so I should be. 😄 So I don't want you to feel guilty, if anything I want you to be proud of the fact that you made this package available for everyone to use. 👍 Now that that's in the clear, I think it would be good to have contributing guidelines in general, but it's not a necessity. And if pull requests are welcome, then that's fantastic. 😄 Are we good? |
Wrong week number. Today (3 January 2017) it emits week 0.
The text was updated successfully, but these errors were encountered: