Documentation ¶
Index ¶
- func DefaultParseHHMMSS(value string) (time.Time, error)
- func DefaultParseTodayHHMMSS(value string) (time.Time, error)
- func FirstTime(year int, month time.Month, day int) time.Time
- func FirstTimeOffsetDays(days int) time.Time
- func FirstTimeToday() time.Time
- func FirstTimeTomorrow() time.Time
- func FirstTimeYesterday() time.Time
- func LastTime(year int, month time.Month, day int) time.Time
- func LastTimeOffsetDays(days int) time.Time
- func LastTimeToday() time.Time
- func LastTimeTomorrow() time.Time
- func LastTimeYesterday() time.Time
- func ParseHHMMSS(layout, value string) (time.Time, error)
- func ParseTodayHHMMSS(layout, value string) (time.Time, error)
- func Today(hour, min, sec, nsec int) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultParseHHMMSS ¶
DefaultParseHHMMSS is like ParseHHMMSS but differs in one way, define the format as
15:04:05
func DefaultParseTodayHHMMSS ¶
DefaultParseTodayHHMMSS is like ParseTodayHHMMSS but differs in one way, define the format as
15:04:05
func FirstTimeOffsetDays ¶
FirstTimeOffsetDays like as FirstTimeToday but offset days
func FirstTimeToday ¶
FirstTimeToday return first time(00:00:00) of today
func FirstTimeTomorrow ¶
FirstTimeToday return first time(00:00:00) of tomorrow
func FirstTimeYesterday ¶
FirstTimeToday return first time(00:00:00) of yesterday
func LastTimeOffsetDays ¶
LastTimeOffsetDays like as LastTimeToday but offset days
func LastTimeToday ¶
LastTimeToday return last time(23:59:59.999999999) of today
func LastTimeTomorrow ¶
LastTimeToday return last time(23:59:59.999999999) of tomorrow
func LastTimeYesterday ¶
LastTimeToday return last time(23:59:59.999999999) of yesterday
func ParseHHMMSS ¶
ParseHHMMSS is like ParseTodayHHMMSS but differs in one important way, returns the time default today if before now, else define yesterday.
func ParseTodayHHMMSS ¶
ParseTodayHHMMSS parses a formatted string and returns the time value it represents. The layout defines the format by showing how the reference time, defined to be
15:04:05
would be interpreted if it were the value; it serves as an example of the input format. The same interpretation will then be made to the input string. ParseTodayHHMMSS returns a time in Local`s UTC, and force define year, month and day same as today.
Types ¶
This section is empty.