mirror of
https://github.com/glanceapp/glance.git
synced 2025-02-21 12:51:38 +01:00
Switch from time.ISOWeak()
This commit is contained in:
parent
e51370fe6f
commit
2012983025
@ -60,7 +60,7 @@ type calendar struct {
|
|||||||
// TODO: very inflexible, refactor to allow more customizability
|
// TODO: very inflexible, refactor to allow more customizability
|
||||||
// TODO: allow changing between showing the previous and next week and the entire month
|
// TODO: allow changing between showing the previous and next week and the entire month
|
||||||
func newCalendar(now time.Time, startSunday bool, icsurl string) *calendar {
|
func newCalendar(now time.Time, startSunday bool, icsurl string) *calendar {
|
||||||
year, week := now.ISOWeek()
|
year, week := now.Year(), int(now.Weekday())
|
||||||
weekday := now.Weekday()
|
weekday := now.Weekday()
|
||||||
if !startSunday {
|
if !startSunday {
|
||||||
weekday = (weekday + 6) % 7 // Shift Monday to 0
|
weekday = (weekday + 6) % 7 // Shift Monday to 0
|
||||||
|
Loading…
Reference in New Issue
Block a user