Documentation ¶
Index ¶
- Constants
- func FirstSecondOfDay(offset ...int) time.Time
- func GetFirstDayOfWeek(offsetWeek ...int) time.Time
- func GetLastDayOfWeek(offsetWeek ...int) time.Time
- func LastSecondOfDay(offset ...int) time.Time
- func Today() time.Time
- func Tomorrow() time.Time
- func Transform(t time.Time, rule ...[]TransformRule) string
- func UnixToString(unix int64, format string) string
- func Yesterday() time.Time
- type TransformRule
Constants ¶
View Source
const ( TimeLayout = "15:04:05" DateLayout = "2006-01-02" DatetimeLayout = "2006-01-02 15:04:05" TimeFormat = "H:i:s" DateFormat = "Y-m-d" DatetimeFormat = "Y-m-d H:i:s" )
Variables ¶
This section is empty.
Functions ¶
func GetFirstDayOfWeek ¶
GetFirstDayOfWeek 获取一周中的第一天 offsetWeek 偏移周,例如:-1:上一周 1:下一周
func GetLastDayOfWeek ¶
GetLastDayOfWeek 获取一周中的最后一天 offsetWeek 偏移周,例如:-1:上一周 1:下一周
Types ¶
type TransformRule ¶
Click to show internal directories.
Click to hide internal directories.