Documentation
¶
Index ¶
- Constants
- func ConvertIDNToASCII(urlStr string) (string, error)
- func GetLastResetDate(resetDay int, currentDate time.Time) time.Time
- func GetLastResetInstant(resetDay int, clock, timezone string, currentDate time.Time) time.Time
- func ParseResetClock(value string) (hour, minute, second int, err error)
- func ResetLocation(name string) *time.Location
Constants ¶
const DefaultResetTimezone = "Asia/Shanghai"
Variables ¶
This section is empty.
Functions ¶
func ConvertIDNToASCII ¶
ConvertIDNToASCII 将包含国际化域名(IDN)的 URL 转换为 ASCII 兼容编码(ACE)格式 例如: "https://中文域名.com" -> "https://xn--fiq228c.com"
func GetLastResetDate ¶
GetLastResetDate 计算上一个重置日期(北京时间当天 0:00)。
func GetLastResetInstant ¶
GetLastResetInstant 按指定时区与时刻计算上一次流量重置。 时区或时刻为空时与 Lite 存量升级一致:Asia/Shanghai + 00:00:00。
func ParseResetClock ¶
func ResetLocation ¶
Types ¶
This section is empty.