How to Install Dayjs: npm, CDN and Direct Download
Every route for adding Dayjs to a project, from a single npm command to a CDN script tag, with checks that confirm everything is wired up correctly.
Read the guideNine practical tutorials that take you from installing Dayjs to formatting, parsing, time zones, plugins, locales and a smooth migration away from Moment.js. Each article stands on its own, and every one links to the topics that naturally follow it.
Every route for adding Dayjs to a project, from a single npm command to a CDN script tag, with checks that confirm everything is wired up correctly.
Read the guideA thorough walk through format tokens, escaped text and the plugins that add ordinals, quarters and locale-aware patterns to your output.
Read the guideHow Dayjs turns strings, numbers and Date objects into reliable values, and how to validate input that arrives in unusual formats.
Read the guideAdd and subtract time, jump to the start or end of a period, measure differences and compare dates without ever mutating the original value.
Read the guideStore in UTC, display in local time and convert safely between regions with the UTC and Timezone plugins, including daylight saving edge cases.
Read the guideProduce phrases such as “3 hours ago”, build countdowns and present elapsed time in a way people understand at a glance.
Read the guideLearn how the plugin system keeps the core tiny, which official plugins earn a place in most projects and how to write one of your own.
Read the guideServe dates in the language and conventions your audience expects, loading only the locales you actually need.
Read the guideA calm, step-by-step plan for replacing Moment.js with Dayjs, including the differences that catch teams out and a testing strategy that keeps releases safe.
Read the guide