# Functions
AddMonths adds a given number of months to a date and returns the new date.
AddYears adds a given number of years to a date and returns the new date.
ChineseZodiac returns the Chinese zodiac sign for the given year.
DateAdd adds a duration to the given date and returns the new date.
DateDiff calculates the difference between two dates and returns the duration.
DateRange generates a slice of dates between the start and end dates, inclusive.
DayOfWeekFromTime converts time.Weekday to DayOfWeek.
DaysBetween calculates the number of days between two dates.
DaysInMonth returns the number of days in a given month of a specific year.
FormatDate formats a time.Time object into a string based on the provided layout.
FormatDuration formats a duration into a human-readable string.
GetCurrentTime returns the current local time.
GetCurrentUTCTime returns the current UTC time.
GetDatePart extracts a specific part of the date (year, month, day, hour, minute, second).
GetEndOfDay returns the end time of the day for the given date.
GetStartOfDay returns the start time of the day for the given date.
IsLeapYear checks if a given year is a leap year.
IsWeekday checks if a given date falls on a weekday.
IsWeekend checks if a given date falls on a weekend.
MonthsBetween calculates the number of months between two dates.
NewDateTime creates a new DateTime instance
Parameters: - t: the time.Time object to wrap
Returns: - *DateTime: the new DateTime instance.
NewTimeInterval creates a new TimeInterval instance and starts the timer
Returns: - *TimeInterval: a new TimeInterval instance.
Now returns the current DateTime
Returns: - *DateTime: the current DateTime.
Of converts time.Month to Month.
ParseDateString parses a date string into a time.Time object.
WeeksBetween calculates the number of weeks between two dates.
YearsBetween calculates the number of years between two dates.
ZodiacSign returns the zodiac sign for the given date.
# Constants
ANSI C's asctime() format.
No description provided by the author
No description provided by the author
7~9 months.
Custom date format (DD-MM-YYYY).
Custom date and time format (DD-MM-YYYY HH:MM:SS).
Custom time format (HH:MM:SS).
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
ISO 8601 combined date and time with timezone.
ISO 8601 date only.
ISO 8601 time only.
No description provided by the author
No description provided by the author
No description provided by the author
The time in 12-hour AM/PM format.
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
RFC 1123 date and time.
RFC 1123 with numeric timezone.
RFC 3339 combined date and time with timezone.
RFC 3339 with nanosecond precision.
Ruby's date format.
No description provided by the author
No description provided by the author
No description provided by the author
1~3 months.
Date and time without year.
Date and time with microsecond precision.
Date and time with millisecond precision.
Date and time with nanosecond precision.
4~6 months.
No description provided by the author
No description provided by the author
No description provided by the author
Unix date format.
No description provided by the author
No description provided by the author
10~12 months.
# Structs
DatePattern provides common date formatting patterns.
DateTime is a wrapper around time.Time to provide more utility methods.
TimeInterval is a simple timer class used to calculate the duration of code execution.