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

default calendar incorrectly calculates offsets for full day events. in format=relative #1572

Closed
sdetweil opened this issue Feb 14, 2019 · 1 comment

Comments

@sdetweil
Copy link
Collaborator

Please only submit reproducible issues.

the issue is the code uses startDate.fromNow() to calculate the date offset, but fromNow() uses wall clock time (hours/minutes) which causes date rounding..

the code needs to be changed to use startDate.from(moment().format("MMDDYYY"))

timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").from(moment().format("YYYYMMDD")));
to use start of day comparisons..

will attach a PR with the changes.

@sdetweil sdetweil changed the title default calendar incorrectly calculates offsets for full day events. default calendar incorrectly calculates offsets for full day events. in format=relative Feb 14, 2019
@MichMich
Copy link
Collaborator

The PR is merged.

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

No branches or pull requests

2 participants