Documentation
¶
Index ¶
- func DecimalAgeAsOf(birthDate time.Time, asOfDate time.Time) float64
- func FormatSqlDateTime(dateTime time.Time) string
- func GetAgeAsOf(birthDate time.Time, asOfDate time.Time) int
- func GetBirthdayForAge(birthDate time.Time, targetAge int) time.Time
- func GetCurrentAge(birthDate time.Time) int
- func GetDateForAge(birthDate time.Time, targetAge float64) time.Time
- func GetMaxEndDate() time.Time
- func ParseIsoString(input string) (time.Time, error)
- func StartOfNextMonth(fromDate time.Time, inclusive bool) time.Time
- func ToEndOfDay(dateTime time.Time) time.Time
- func ToStartOfDay(dateTime time.Time) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSqlDateTime ¶
func GetAgeAsOf ¶
GetCurrentAge calculates age in years for a given birthdate, as of a specific date. Note, this function is not timezone aware
func GetCurrentAge ¶
GetCurrentAge calculates age in years for a given birthdate, as of right now. Note, this function is not timezone aware
func GetMaxEndDate ¶
func StartOfNextMonth ¶
Returns the first of the next month, after the provided fromDate, ignoring the time. If inclusive == true and the fromDate is the first of the month, it will return the fromDate. If inclusive == false and the fromDate is the first of the month, it will return fromDate + 1 month.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.