Documentation
¶
Index ¶
- func AddDays(t time.Time, days int) time.Time
- func AddMonths(t time.Time, months int) time.Time
- func AddYears(t time.Time, years int) time.Time
- func DaysBetween(t1, t2 time.Time) int
- func DaysInMonth(year int, month time.Month) int
- func FormatDate(t time.Time, layout string) string
- func IsWeekend(t time.Time) bool
- func ParseDate(dateStr, layout string) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaysBetween ¶
DaysBetween calculates the difference in days between two dates.
func DaysInMonth ¶
DaysInMonth returns the number of days in the specified month of the specified year.
func FormatDate ¶
FormatDate formats the date to "YYYY-MM-DD" by default, or uses a custom layout if provided.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.