Simple Go package for dealing with dates as a serializable type. Like time.Time, but just the date.
- Go 100%
| date.go | ||
| date_test.go | ||
| go.mod | ||
| License.txt | ||
| Readme.md | ||
date
Simple Go package for dealing with dates as a serializable type. Like time.Time, but just the date.
The date.Date type implements json.Marshaler, json.Unmarshaler, sql.Scanner, and driver.Valuer, meaning you can serialize it to and from json as well as databases.
You can perform simple arithmetic on date values using AddDays, AddMonths, and AddYears. For example, you can do date.Today().AddMonths(2).AddDays(3) to specify a date 2 months and 3 days in the future.