modulepackage
0.0.0-20180127205834-23f96bd23f7a
Repository: https://github.com/rndity/time.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
CalculateDuration returns time duration between two DateTimes.
No description provided by the author
MustCreateNewLocalTime is like NewLocalTime but panics on error.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MustParseLocalDate parses string into date using LocalDateFormat and panics if it is impossible.
MustParseLocalDateTime parses string into LocalDateTime.
MustParseLocalTime parses string in form of "15:04".
MustParseTimeSpan parses string in form of "15:04-15:04" into LocalTimeSpan.
NewClock creates new Clock.
NewDateTimeSpan creates DateTimeSpan instance.
NewLocalDate creates instances of LocalDate.
NewLocalDateTime creates instances of LocalDateTime.
NewLocalTime creates instances of LocalTime.
NewOneDayPeriod creates Period that represents a single day.
NewOpenDateTimeSpanFrom creates DateTimeSpan that represents a set of days between "from" (inclusive) and eternity.
NewOpenPeriodFrom creates Period that represents a set of days between "from" (inclusive) and eternity.
NewPeriod creates Period that represents a set of days between two dates: "from" (inclusive) and "to" (inclusive).
No description provided by the author
No description provided by the author
NewTimeSpan creates new LocalTimeSpan.
ParseLocalDate parses string into date using LocalDateFormat.
ParseLocalDateTime parses string into LocalDateTime.
ParseLocalTime parses string into LocalTime.
ParseWeekday parses string into Weekday.
ToLocalDate converts date from go's time.Time to LocalDate.
ToLocalTime converts time from go's time.Time to LocalTime.
# Constants
Constants representing days of a week.
Common durations.
yyyy-mm-dd.
Common durations.
Common durations.
Common durations.
Constants representing days of a week.
Common durations.
Constants representing days of a week.
Constants representing days of a week.
Common durations.
Constants representing days of a week.
Constants representing days of a week.
Constants representing days of a week.
Constants representing days of a week.
# Variables
TimeKey is key to keep current time in context.
ErrPeriodInvalidFromAfterTo is returned when Period creating is called with invalid parameters: from > to.
ErrPeriodInvalidParamNull is returned when Period creating is called with invalid parameters: from or to is NullLocalDate.
No description provided by the author
NullLocalDate is used to represent missing date value.
NullLocalDateTime is used to represent missing LocalDateTime value.
NullLocalTime is used to represent missing date value.
# Structs
DateTimeSpan represents time span between two moments.
LocalDate represents a date without taking into account a timezone.
LocalDateTime represents a date and time without taking into account a timezone.
LocalTime represents time of a day without taking into account a timezone.
LocalTimeSpan represents a span between two LocalTime instances.
NullableLocalDate represents a LocalDate that may be null.
NullableLocalDateTime represents a LocalDateTime that may be null.
Period represents a set of days between two dates (inclusive).
# Type aliases
A Duration represents the elapsed time between two instants as an int64 nanosecond count.
UserTypeCtxKey is type to keep time in context.
UnixTimeStamp represents number of seconds elapsed since January 1, 1970 UTC.
Weekday represents day of a week.