Documentation ¶
Index ¶
- func DiffNatureDays(t1str string, t2str string) int
- func FormatLocalDateOnly(t *time.Time) string
- func FormatLocalDateTime(t *time.Time) string
- func FormatNowDateOnly() string
- func FormatNowDateTime() string
- func GetChinaMonth(t *time.Time) string
- func GetChinaWeek(t *time.Time) string
- func GetWeek(t *time.Time) int
- func GetYear(t *time.Time) int
- func ParseLocalDateOnly(date string) *time.Time
- func ParseLocalDateTime(dateTime string) *time.Time
- func ParseNowDateOnly() *time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffNatureDays ¶
DiffNatureDays 计算两个时间相差的天数
func FormatLocalDateOnly ¶
FormatLocalDateOnly 将time.Time转化为日期格式
func FormatLocalDateTime ¶
FormatLocalDateTime 将time.Time转化为日期时间格式
func ParseLocalDateOnly ¶
ParseLocalDateOnly 将日期字符串转换为time.Time,dateTime参数如果不是日期字符串会panic
func ParseLocalDateTime ¶
ParseLocalDateTime 将日期时间字符串转换为time.Time,dateTime参数如果不是日期时间字符串会panic
func ParseNowDateOnly ¶
ParseNowDateOnly 将当前时间转换为time.Time,仅有日期信息
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.