Documentation ¶
Index ¶
- Variables
- func DateEqual(i *google_type.Date, j *google_type.Date) bool
- func DateInRange(d *google_type.Date, start *google_type.Date, end *google_type.Date) bool
- func DateLess(i *google_type.Date, j *google_type.Date) bool
- func DateToTime(d *google_type.Date) time.Time
- func NewDate(month int32, day int32, year int32) *google_type.Date
- func Now() *google_type.Date
- func TimeToDate(t time.Time) *google_type.Date
- type Dater
- type FakeDater
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// SystemDater is a Dater that uses the system UTC time.
SystemDater = &systemDater{}
)
Functions ¶
func DateEqual ¶
func DateEqual(i *google_type.Date, j *google_type.Date) bool
DateEqual returns true if i equals j.
func DateInRange ¶
func DateInRange(d *google_type.Date, start *google_type.Date, end *google_type.Date) bool
DateInRange returns whether d is within start to end, inclusive. The given date is expected to not be nil. If start is nil, it checks whether d is less than or equal to end. If end is nil it checks whether d is greater than or equal to end. If start and end are nil, it returns true.
func DateLess ¶
func DateLess(i *google_type.Date, j *google_type.Date) bool
DateLess returns true if i is before j.
func DateToTime ¶
DateToTime converts a Date to a golang Time.
func NewDate ¶
NewDate is a convienence function to create a new Date.
Types ¶
Click to show internal directories.
Click to hide internal directories.