Overview
date(input?) returns a MatesDate — a branded timestamp with methods for formatting, relative time, arithmetic, age, and predicates. No external date library required.
Month names, weekday names, and relative phrases follow the locale and timezone settings. Those setters are shared module state, not atoms.
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.