Date Calculations
For ease of use, Knackly evaluates dates with the following functions and determines the outcome.
Helper Methods | Result Type | Parameters | ||
---|---|---|---|---|
parse | date | text or number | ||
today | date | |||
addDays | date | base date | number of days to add | |
addWeeks | date | base date | number of weeks to add | |
addMonths | date | base date | number of months to add | |
addYears | date | base date | number of years to add | |
subDays | date | base date | number of days to subtract | |
subWeeks | date | base date | number of weeks to subtract | |
subMonths | date | base date | number of months to subtract | |
subYears | date | base date | number of years to subtract | |
age | number | birth date | ||
new | date | year, month, day | ||
dayOf | number | |||
dayOfWeek | number | |||
daysBetween | number | |||
monthOf | number | |||
monthsBetween | number | |||
yearOf | number | |||
yearsBetween | number | |||