We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Your Day Of Year Native code will fail between midnight and 1am during daylight savings.
My replacement was:
Math.floor( (new Date().setHours(2) - new Date(new Date().getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24 );
which forces the time for the day.
Alternatively:
Math.floor( (Date.UTC(year, month, day) - Date.UTC(year, 0, 0)) / 1000 / 60 / 60 / 24 )
The opposite code is quite simple, too:
new Date(year, 0 , dayOfYear)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Your Day Of Year Native code will fail between midnight and 1am during daylight savings.
My replacement was:
Math.floor( (new Date().setHours(2) - new Date(new Date().getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24 );
which forces the time for the day.
Alternatively:
Math.floor( (Date.UTC(year, month, day) - Date.UTC(year, 0, 0)) / 1000 / 60 / 60 / 24 )
The opposite code is quite simple, too:
new Date(year, 0 , dayOfYear)
The text was updated successfully, but these errors were encountered: