mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-18 12:14:37 +00:00
feat(lol): add tomorrow and next-week schedules
This commit is contained in:
1 parent
0a4d237391
commit
00a5ff1c0b
9 files changed
+182
-22
No files matched your search
@@ -47,6 +47,12 @@ func ictWeekStartOf(now time.Time) time.Time {
|
||||
return day.AddDate(0, 0, -daysFromMonday).UTC()
|
||||
}
|
||||
|
||||
// ictNextWeekStartOf returns the Monday 00:00 ICT after the current ICT
|
||||
// calendar week, expressed as a UTC instant.
|
||||
func ictNextWeekStartOf(now time.Time) time.Time {
|
||||
return addDays(ictWeekStartOf(now), 7)
|
||||
}
|
||||
|
||||
// addDays returns date + days, preserving time-of-day.
|
||||
func addDays(date time.Time, days int) time.Time {
|
||||
return date.Add(time.Duration(days) * 24 * time.Hour)
|
||||
|
||||
Reference in new issue
Block a user