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
Algorithm used in changeTime() and setRange() works incorrectly when start or end date falls on DST change day.
Currently both functions set date/time to beginning of the day then add to it selected hours and minutes, this way:
opt[name] = parseInt( moment(parseInt(date)) .startOf('day') .add(moment(opt[name + 'Time']).format('HH'), 'h') .add(moment(opt[name + 'Time']).format('mm'), 'm') .valueOf() );
For example, for year 2020 when selected time range is 00:00 – 23:59:
Problem can be solved by setting hours and minutes directly instead of adding them to the beginning of the day.
opt[name] = parseInt( moment(parseInt(date)) .startOf('day') .hour(moment(opt[name + 'Time']).format('H')) .minute(moment(opt[name + 'Time']).format('m')) .valueOf() );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Algorithm used in changeTime() and setRange() works incorrectly when start or end date falls on DST change day.
Currently both functions set date/time to beginning of the day then add to it selected hours and minutes, this way:
For example, for year 2020 when selected time range is 00:00 – 23:59:
Problem can be solved by setting hours and minutes directly instead of adding them to the beginning of the day.
The text was updated successfully, but these errors were encountered: