Documentation ¶
Overview ¶
Package date contains the Date datatype.
Index ¶
- Variables
- type Date
- func (d Date) AddDays(days int) Date
- func (d Date) After(other Date) bool
- func (d Date) Before(other Date) bool
- func (d Date) FirstSecondIn(loc *time.Location) time.Time
- func (d *Date) Scan(src interface{}) error
- func (d Date) String() string
- func (d Date) Sub(other Date) int
- func (d Date) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Epoch = Date{1970, time.January, 1}
Epoch is the Date value for the Unix epoch. It is used as a stand-in for missing dates.
Functions ¶
This section is empty.
Types ¶
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
Date represents a calendar date. It's similar to time.Time, but it carries no information neither about the time of day nor about the timezone.
func (Date) AddDays ¶
AddDays shifts this date by that many days into the future (or into the past, if the number of days is negative).
func (Date) FirstSecondIn ¶
FirstSecondIn returns a timestamp representing the second when the day with this Date starts in the given timezone.
Click to show internal directories.
Click to hide internal directories.