Documentation
¶
Index ¶
- func AddDayOfNow(day int) time.Time
- func AddDayOfNowUtc(day int) time.Time
- func AddDayUtc(t time.Time, day int) time.Time
- func GetEpochTime() time.Time
- func GetEpochTimeUtc() time.Time
- func GetNextMonthFirstDay(t time.Time) time.Time
- func GetNextMonthFirstDayNow() time.Time
- func GetNextMonthFirstDayNowUtc() time.Time
- func GetNextMonthFirstDayNowUtcUnix() int64
- func GetNow() time.Time
- func GetNowUtc() time.Time
- func GetNowUtcUnix() int64
- func GetSecondsFromNowToNextMonthFirstDay() int64
- func GetSecondsFromNowToNextMonthFirstDayDuration() time.Duration
- func New(param ...any) *gtime.Time
- func Now() *gtime.Time
- func StrToTime(str string, format ...string) (*gtime.Time, error)
- func Timestamp() int64
- func TimestampMilli() int64
- type UtcTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDayOfNow ¶
func AddDayOfNowUtc ¶
func GetEpochTime ¶
func GetEpochTimeUtc ¶
func GetNextMonthFirstDayNow ¶
func GetNextMonthFirstDayNowUtcUnix ¶
func GetNextMonthFirstDayNowUtcUnix() int64
func GetNowUtcUnix ¶
func GetNowUtcUnix() int64
func GetSecondsFromNowToNextMonthFirstDay ¶
func GetSecondsFromNowToNextMonthFirstDay() int64
func New ¶
New creates and returns a Time object with given parameter. The optional parameter can be type of: time.Time/*time.Time, string or integer.
func StrToTime ¶
StrToTime converts string to *Time object. It also supports timestamp string. The parameter `format` is unnecessary, which specifies the format for converting like "Y-m-d H:i:s". If `format` is given, it acts as same as function StrToTimeFormat. If `format` is not given, it converts string as a "standard" datetime string. Note that, it fails and returns error if there's no date string in `str`.
func TimestampMilli ¶
func TimestampMilli() int64
TimestampMilli retrieves and returns the timestamp in milliseconds.
Types ¶
Click to show internal directories.
Click to hide internal directories.