Documentation ¶
Index ¶
- Constants
- func CurrentMillis() int64
- func DurationFromNow(millis int64) time.Duration
- func DurationMillis(from int64, to int64) time.Duration
- func DurationToNow(millis int64) time.Duration
- func FormatDuration(d time.Duration, layout string) string
- func HoChiMinhTz() (*time.Location, error)
- func HoChiMinhTzDefaultLocal() *time.Location
- func Millis2Str(format string, millis int64, loc *time.Location) string
- func Millis2Time(millis int64) time.Time
- func MillisToStartOfDay(millis int64, loc *time.Location) int64
- func MustHoChiMinhTz() *time.Location
- func Str2Date(text string, loc *time.Location) (*time.Time, error)
- func Str2DateTime(text string, loc *time.Location) (*time.Time, error)
- func Str2Millis(format string, text string, loc *time.Location) (int64, error)
- func Str2Month(text string, loc *time.Location) (*time.Time, error)
- func Str2Time(format string, text string, loc *time.Location) (*time.Time, error)
- func Time2EndMonth(t time.Time) time.Time
- func Time2Millis(t time.Time) int64
- func Time2StartMonth(t time.Time) time.Time
- func ToDateStr(t time.Time, loc *time.Location) string
- func ToDateTimeStr(t time.Time, loc *time.Location) string
- func ToMonthStr(t time.Time, loc *time.Location) string
- func Unix2Time(unix int64) time.Time
- type Date
Constants ¶
View Source
const ( DateTimeFormat string = "2006-01-02T15:04:05" DateFormat string = "2006-01-02" MonthFormat string = "2006-01" )
Variables ¶
This section is empty.
Functions ¶
func CurrentMillis ¶
func CurrentMillis() int64
func DurationFromNow ¶ added in v1.0.3
func DurationToNow ¶ added in v1.0.4
func HoChiMinhTz ¶
func HoChiMinhTzDefaultLocal ¶ added in v1.0.6
func Millis2Time ¶
func MustHoChiMinhTz ¶
func Str2DateTime ¶ added in v1.0.7
func Time2Millis ¶
Types ¶
type Date ¶
func FromDateTime ¶ added in v1.0.3
func (*Date) MarshalJSON ¶
func (*Date) ToEpochUnix ¶
func (*Date) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.