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

Unexpected behavior or bug in calendar widget #293

Open
develoopeer opened this issue Dec 29, 2024 · 1 comment
Open

Unexpected behavior or bug in calendar widget #293

develoopeer opened this issue Dec 29, 2024 · 1 comment

Comments

@develoopeer
Copy link

develoopeer commented Dec 29, 2024

What's the point

In calendar widget current year defined with standard function time.ISOWeak(). And as written in documentation

// ISOWeek returns the ISO 8601 year and week number in which t occurs.
// Week ranges from 1 to 53. Jan 01 to Jan 03 of year n might belong to
// week 52 or 53 of year n-1, and Dec 29 to Dec 31 might belong to week 1
// of year n+1.
func (t Time) ISOWeek() (year, week int){}

last days of December every year will produce year n+1 not n.

Thats what i got with date December 30,2024

image

Do we need to change time.ISOWeak() to time.Now().Date() or not?

Also i'm resolving conflicts of PR #174 now, which involves calendar events. And the change to time.Now().Date() ensure if someone has events during the New Year's holiday, they will see them in the widget.

Happy New Year 🎉🎉🥳

@svilenmarkov
Copy link
Member

Oh my, thanks for reporting this! 😅 I'm in the process of moving the calendar rendering and logic to the front-end since a bunch of people have public instances of Glance and it doesn't make sense for the calendar time to be based on the server time. Presumably this behavior is also present in JS, I'll keep it in mind and try to resolve it.

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