Documentation
¶
Index ¶
- func ConvertToShanghai(t time.Time) time.Time
- func Format(t time.Time) string
- func FormatDate(t time.Time) string
- func Now() time.Time
- func NowTimestamp() int64
- func Parse(timeStr string) (time.Time, error)
- func ParseDate(dateStr string) (time.Time, error)
- func StartOfDay(t time.Time) time.Time
- func StartOfDayTimestamp(t time.Time) int64
- func StartOfMonth(t time.Time) time.Time
- func StartOfMonthTimestamp(t time.Time) int64
- func StartOfWeek(t time.Time) time.Time
- func StartOfWeekTimestamp(t time.Time) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToShanghai ¶
ConvertToShanghai 将任意时区的时间转换为上海时区
func StartOfDayTimestamp ¶
StartOfDayTimestamp 获取指定时间当天的 00:00:00 的毫秒时间戳
func StartOfMonthTimestamp ¶
StartOfMonthTimestamp 获取指定时间所在月份的1日 00:00:00 的毫秒时间戳
func StartOfWeek ¶
StartOfWeek 获取指定时间所在周的周一 00:00:00 周一为一周的开始
func StartOfWeekTimestamp ¶
StartOfWeekTimestamp 获取指定时间所在周的周一 00:00:00 的毫秒时间戳
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.