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
Library relies on minute offsets rather than timezones thus fails to get correct results when timezone offset changes midway (DST crossing)
const event = new CalendarEvent({ //... weekly from 8 to 17 in America/New_York timezone }) const occurences = event.occurencesBetween( moment('2023-10-20T00:00:00').tz('America/New_York', true), moment('2023-11-20T00:00:00').tz('America/New_York', true) ) expect(occurences.map(([start, end]) => [moment(start).tz('America/New_York').format(), moment(end).tz('America/New_York').format()].join(' '))).toEqual([ '2023-10-22T09:00:00-04:00 2023-10-22T17:00:00-04:00', '2023-10-29T09:00:00-04:00 2023-10-29T17:00:00-04:00', '2023-11-05T09:00:00-05:00 2023-11-05T17:00:00-05:00', '2023-11-12T09:00:00-05:00 2023-11-12T17:00:00-05:00', '2023-11-19T09:00:00-05:00 2023-11-19T17:00:00-05:00', ]) /* Actual: Array [ "2023-10-22T09:00:00-04:00 2023-10-22T17:00:00-04:00", "2023-10-29T09:00:00-04:00 2023-10-29T17:00:00-04:00", "2023-11-05T08:00:00-05:00 2023-11-05T16:00:00-05:00", "2023-11-12T08:00:00-05:00 2023-11-12T16:00:00-05:00", "2023-11-19T08:00:00-05:00 2023-11-19T16:00:00-05:00", ] */
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Library relies on minute offsets rather than timezones thus fails to get correct results when timezone offset changes midway (DST crossing)
The text was updated successfully, but these errors were encountered: