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

Event mode - time until a full day event is shown incorrectly #547

Open
2 tasks done
atomic7777 opened this issue Dec 18, 2021 · 5 comments
Open
2 tasks done

Event mode - time until a full day event is shown incorrectly #547

atomic7777 opened this issue Dec 18, 2021 · 5 comments
Labels
type/feature New feature or request

Comments

@atomic7777
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If I'm correct, the amount of time until a full day event is shown incorrectly in the 'event mode' and with 'relative time' enabled.
Now it's saturday evening. The next event is on monday, but the calendar shows it's tomorrow. It should be "in two days". I think it just counts that the event will start at midnight, so it's only 28 hours away. I haven't looked at the code, so I'm not sure.
kalendarz

Expected behaviour

I think it would be great if full day events were trated as full day events (or it could be an option to do it) - the amount of time should be calculated in days - tomorrow, today - not by hours.

Possible Solutions

I was the author of the "original" atomic calendar and if I remember correctly for full day events I set the variable "isFullOneDayEvent" or isFullMoreDaysEvent and calculated the number of days based on that.

Context / Reason

Unfortunately I stopped creating this a few years ago, I know this may involve quite a bit of change, this is just a suggestion. Anyway, great job and I'm glad the calendar has a successor.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@atomic7777 atomic7777 added the type/feature New feature or request label Dec 18, 2021
@marksie1988
Copy link
Collaborator

Hey,

I wasnt able to re-produce this in my lab but will try at different times as I guess that will impact the results here!

That said, this calculation is completed by DayJS using the relative time module, im not too sure if there is much I could do about it, however will do some digging to see if there is any additional configuration for the relative time module.

@marksie1988
Copy link
Collaborator

Ok i now see this issue.

image

@marksie1988
Copy link
Collaborator

so this appears to be the way dayjs deals with relative time:

https://day.js.org/docs/en/display/from-now#list-of-breakdown-range

@lsv
Copy link

lsv commented Feb 4, 2022

Would it be possible to set your own "roundings/thresholds" - Maybe only in the code editor

https://day.js.org/docs/en/customization/relative-time#relative-time-thresholds-and-rounding

I really dont like seeing "in a month" (on a birthday calendar) I would rather just see eg "in 36 days"

With the possibility to adding your own threshold I would be able to do so.
And also, it would be possible to "fix" the 22 hour threshold

@RuneNyhuus
Copy link

Will this be fixed??
Still says (in a day) on something happening in 2 days ?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants