package
1.1.0
Repository: https://github.com/gocarp/go.git
Documentation: pkg.go.dev

# Functions

ConvertZone converts time in string `strTime` from `fromZone` to `toZone`.
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".
New creates and returns a Time object with given parameter.
NewFromStr creates and returns a Time object with given string.
NewFromStrFormat creates and returns a Time object with given string and custom format like: Y-m-d H:i:s.
NewFromStrLayout creates and returns a Time object with given string and stdlib layout like: 2006-01-02 15:04:05.
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.
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.
RFC822 returns current datetime in RFC822 format like "Mon, 02 Jan 06 15:04 MST".
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.

# Constants

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
No description provided by the author

# Structs

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