package globals

import (
	"netease_control_center/interfaces/log"
	"time"
)

type DayZone uint8

const (
	MORNING DayZone = iota
	NIGHT
)
const (
	MORNING_BEGIN = 0
	MORNING_END   = 12
	NIGHT_BEGIN   = 12
	NIGHT_END     = 24
)

func GetDayZone() DayZone {
	hour := time.Now().Hour()
	log.Println(log.DebugLog, "hour:", hour)
	if hour >= MORNING_BEGIN && hour < MORNING_END {
		return MORNING
	} else if hour >= NIGHT_BEGIN && hour < NIGHT_END {
		return NIGHT
	}
	return MORNING
}
