Documentation
¶
Index ¶
- Constants
- func DefaultLocation() *time.Location
- func NumDays(from Date, to Date) int
- type Date
- func (d Date) AddDays(days int) Date
- func (d Date) AddMonths(months int) Date
- func (d Date) AddYears(years int) Date
- func (d Date) After(od Date) bool
- func (d Date) Before(od Date) bool
- func (d Date) BeforeOrAt(od Date) bool
- func (d Date) BetweenInclusive(from, to Date) bool
- func (d Date) CanonicalString() string
- func (d Date) Day() int
- func (d Date) Format() string
- func (d Date) FormatInLayout(layout string) string
- func (d Date) GermanWeekDay() GermanWeekday
- func (d Date) ISOWeek() ISOWeek
- func (d Date) IsZero() bool
- func (d Date) MarshalJSON() ([]byte, error)
- func (d Date) Month() time.Month
- func (d Date) RFCString() string
- func (d Date) String() string
- func (d Date) Sub(ot Date) time.Duration
- func (d Date) Time() time.Time
- func (d *Date) UnmarshalJSON(data []byte) error
- func (d Date) WeekDay() time.Weekday
- func (d Date) Year() int
- type GermanWeekday
- type ISOWeek
- type YearMonth
Constants ¶
View Source
const CanonicalDate = "2006-01-02"
Variables ¶
This section is empty.
Functions ¶
func DefaultLocation ¶
Types ¶
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
func (Date) BeforeOrAt ¶
func (Date) BetweenInclusive ¶
func (Date) CanonicalString ¶
func (Date) FormatInLayout ¶
func (Date) GermanWeekDay ¶
func (d Date) GermanWeekDay() GermanWeekday
func (Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type GermanWeekday ¶
type GermanWeekday int
const ( Monday GermanWeekday = 1 + iota Tuesday Wednesday Thursday Friday Saturday Sunday )
func AllGermanWeekdays ¶
func AllGermanWeekdays() []GermanWeekday
func AllGermanWorkingWeekdays ¶
func AllGermanWorkingWeekdays() []GermanWeekday
func (GermanWeekday) Abbreviate ¶
func (gwd GermanWeekday) Abbreviate() string
func (GermanWeekday) Name ¶
func (gwd GermanWeekday) Name() string
type ISOWeek ¶
func DecodeISOWeek ¶
func (ISOWeek) DateOf ¶
func (w ISOWeek) DateOf(day GermanWeekday) Date
type YearMonth ¶
type YearMonth struct {
// contains filtered or unexported fields
}
func YearMonthNow ¶
func YearMonthNow() YearMonth
Click to show internal directories.
Click to hide internal directories.