Предлагаю такой прикол с НГ сделать
This commit is contained in:
parent
d2623b44e5
commit
f38fca44fb
|
@ -105,7 +105,7 @@ func WeatherMessage(w weather.Weather) string {
|
||||||
|
|
||||||
func NewYearMessage(message new_year_service.NewYearMessage) string {
|
func NewYearMessage(message new_year_service.NewYearMessage) string {
|
||||||
loc := time.FixedZone("UTC+7", +7*60*60)
|
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)
|
now := time.Now().In(loc)
|
||||||
days := ny.Sub(now).Hours() / 24
|
days := ny.Sub(now).Hours() / 24
|
||||||
if message.Header != "" {
|
if message.Header != "" {
|
||||||
|
|
Loading…
Reference in New Issue