Предлагаю такой прикол с НГ сделать

This commit is contained in:
k.ukolov 2023-02-10 13:27:39 +07:00
parent d2623b44e5
commit f38fca44fb
1 changed files with 8 additions and 8 deletions

View File

@ -105,7 +105,7 @@ func WeatherMessage(w weather.Weather) string {
func NewYearMessage(message new_year_service.NewYearMessage) string {
loc := time.FixedZone("UTC+7", +7*60*60)
ny := time.Date(2024, 1, 1, 0, 0, 0, 0, loc)
ny := time.Date(time.Now().Year()+1, 1, 1, 0, 0, 0, 0, loc)
now := time.Now().In(loc)
days := ny.Sub(now).Hours() / 24
if message.Header != "" {