Plugins
The core covers what nearly every app does with a date. Each plugin adds one more thing when you import it, so you ship only the ones you use. Select the ones you want and copy the setup.
// select plugins below to add them here
import { today } from 'native-dates';
today();- Selected
- 0 of 6
- Plugins add
- 0.0 kB min+br
- Total with core
- 7.3 kB min+br
ranges
Spans between two dates, datetimes or times, with
1.6 kB min+brto(),contains(),overlaps()andpoints().tokens
Token patterns such as
0.8 kB min+brYYYY-MM-DD HH:mminformat(), as Day.js and Moment write them.relative
0.3 kB min+brformatRelative(): “in 3 days” or “3 hours ago”, in the reader’s language.zones
Zones by city,
0.7 kB min+br'Berlin', by abbreviation,'PT', and by names of your own.loose
Reads what
0.2 kB min+brDatereads, such as'March 5, 2026', and givesnullfor what can’t be read.legacy-date
The
0.3 kB min+brDategetters,getFullYear()and the rest, on a datetime, for code that still calls them.
No plugin matches “”.
Need something else?
A plugin is a module you import: it adds methods to the four nouns and wraps the ones already there. Writing a plugin covers how.