package
1.0.12
Repository: https://github.com/basicfu/gf.git
Documentation: pkg.go.dev

# Functions

Date returns current date in string like "2006-01-02".
Datetime returns current datetime in string like "2006-01-02 15:04:05".
FuncCost calculates the cost time of function <f> in nanoseconds.
ISO8601 returns current datetime in ISO8601 format like "2006-01-02T15:04:05-07:00".
Microsecond returns the timestamp in microseconds.
Millisecond returns the timestamp in milliseconds.
Nanosecond returns the timestamp in nanoseconds.
New creates and returns a Time object with given parameter.
NewFromTime creates and returns a Time object with given time.Time object.
NewFromTimeStamp creates and returns a Time object with given timestamp, which can be in seconds to nanoseconds.
No description provided by the author
Now creates and returns a time object of now.
ParseDuration parses a duration string.
ParseTimeFromContent retrieves time information for content string, it then parses and returns it as *Time object.
ISO8601 returns current datetime in RFC822 format like "Mon, 02 Jan 06 15:04 MST".
Second returns the timestamp in seconds.
SetTimeZone sets the time zone for current whole process.
StrToTime converts string to *Time object.
StrToTimeFormat parses string <str> to *Time object with given format <format>.
StrToTimeLayout parses string <str> to *Time object with given format <layout>.
Timestamp retrieves and returns the timestamp in seconds.
TimestampMicro retrieves and returns the timestamp in microseconds.
TimestampMicroStr is a convenience method which retrieves and returns the timestamp in microseconds as string.
TimestampMilli retrieves and returns the timestamp in milliseconds.
TimestampMilliStr is a convenience method which retrieves and returns the timestamp in milliseconds as string.
TimestampNano retrieves and returns the timestamp in nanoseconds.
TimestampNanoStr is a convenience method which retrieves and returns the timestamp in nanoseconds as string.
TimestampStr is a convenience method which retrieves and returns the timestamp in seconds as string.
No description provided by the author

# Constants

Short writes for common usage durations.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Time is a wrapper for time.Time for additional features.