Overview
date(input?) returns a MatesDate — a branded timestamp with methods for formatting, relative time, arithmetic, age, and predicates. No external date library required.
Configure locale and timezone with setLocale, setTimezone, and setTimezoneOffset. Calendar helpers getMonths / getCalendar build locale-aware month labels and week grids.
Factory vs calendar helpers
|
API
|
Returns
|
Notes
|
|---|---|---|
date(input?)
| MatesDate | Format, arithmetic, predicates |
getCalendar(y, m)
| MatesDate[][] | Sunday-start week rows |
getMonths()
| MonthInfo[] | Localised month names |
Live date() demo
Pick any date to see formatting, relative time, and arithmetic update in real time.
getCalendar month grid
Week rows of MatesDate for the selected month — today highlighted.