Documentation
¶
Index ¶
- type AstrologicalSign
- type DateDiff
- type Duration
- type FullDate
- func (fd FullDate) Age(referenceDate time.Time) DateDiff
- func (fd FullDate) AgeYears(referenceDate time.Time) int
- func (fd FullDate) AstrologicalSign() AstrologicalSign
- func (fd FullDate) InverseAge(referenceDate time.Time) DateDiff
- func (fd FullDate) InverseAgeYears(referenceDate time.Time) int
- func (fd FullDate) NextAnniversary(referenceDate time.Time) time.Time
- func (fd FullDate) NextAnniversaryFullDate(referenceDate time.Time) FullDate
- func (fd FullDate) NextInDays(referenceDate time.Time) int
- func (fd FullDate) WeekdayName() string
- type SparseDate
- func (sd *SparseDate) Date() FullDate
- func (sd *SparseDate) Format(formatString string) string
- func (sd *SparseDate) FormatShort(formatString string) string
- func (sd *SparseDate) GetDate() time.Time
- func (sd *SparseDate) GetDateFormatted(format string) string
- func (sd *SparseDate) GetMax() FullDate
- func (sd *SparseDate) GetMaxDate() time.Time
- func (sd *SparseDate) GetMin() FullDate
- func (sd *SparseDate) GetMinDate() time.Time
- func (sd *SparseDate) IsComplete() bool
- func (sd *SparseDate) IsCompleteDayAndMonth() bool
- func (sd *SparseDate) IsCompleteYear() bool
- func (sd *SparseDate) IsEmpty() bool
- func (sd SparseDate) MarshalJSON() ([]byte, error)
- func (sd *SparseDate) Parse(input, dateFormat string)
- func (sd *SparseDate) String() string
- func (sd *SparseDate) Year() string
- func (sd *SparseDate) YearInt() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AstrologicalSign ¶
type DateDiff ¶
func GetDateDiff ¶
type FullDate ¶
func (FullDate) Age ¶
Age returns the number of years, months, and days passed at the given reference date since this FullDate.
func (FullDate) AgeYears ¶
AgeYears returns the number of full years passed for the given reference date since this FullDate.
func (FullDate) AstrologicalSign ¶
func (fd FullDate) AstrologicalSign() AstrologicalSign
func (FullDate) NextAnniversary ¶
func (FullDate) NextAnniversaryFullDate ¶
func (FullDate) WeekdayName ¶
type SparseDate ¶
type SparseDate struct {
// contains filtered or unexported fields
}
func SparseDateFrom ¶
func SparseDateFrom(date string) *SparseDate
func SparseDateFromLocalized ¶
func SparseDateFromLocalized(input, dateFormat string) *SparseDate
func (*SparseDate) Date ¶
func (sd *SparseDate) Date() FullDate
func (*SparseDate) Format ¶
func (sd *SparseDate) Format(formatString string) string
func (*SparseDate) FormatShort ¶
func (sd *SparseDate) FormatShort(formatString string) string
func (*SparseDate) GetDate ¶
func (sd *SparseDate) GetDate() time.Time
func (*SparseDate) GetDateFormatted ¶
func (sd *SparseDate) GetDateFormatted(format string) string
func (*SparseDate) GetMax ¶
func (sd *SparseDate) GetMax() FullDate
func (*SparseDate) GetMaxDate ¶
func (sd *SparseDate) GetMaxDate() time.Time
func (*SparseDate) GetMin ¶
func (sd *SparseDate) GetMin() FullDate
func (*SparseDate) GetMinDate ¶
func (sd *SparseDate) GetMinDate() time.Time
func (*SparseDate) IsComplete ¶
func (sd *SparseDate) IsComplete() bool
func (*SparseDate) IsCompleteDayAndMonth ¶
func (sd *SparseDate) IsCompleteDayAndMonth() bool
func (*SparseDate) IsCompleteYear ¶
func (sd *SparseDate) IsCompleteYear() bool
func (*SparseDate) IsEmpty ¶
func (sd *SparseDate) IsEmpty() bool
func (SparseDate) MarshalJSON ¶
func (sd SparseDate) MarshalJSON() ([]byte, error)
func (*SparseDate) Parse ¶
func (sd *SparseDate) Parse(input, dateFormat string)
func (*SparseDate) String ¶
func (sd *SparseDate) String() string
func (*SparseDate) Year ¶
func (sd *SparseDate) Year() string
func (*SparseDate) YearInt ¶
func (sd *SparseDate) YearInt() int