pkgdocs/compare/dayjs vs pendulum

Comparing

npm

dayjs

2KB immutable date time library alternative to Moment.js with the same modern API

43.9M/ wk
v1.11.20
vs
Python

pendulum

Drop-in datetime replacement with first-class timezone support, DST awareness, and intuitive arithmetic.

2.0M/ wk
v3.0.0
Metricdayjspendulum
EcosystemnpmPython
DifficultyIntermediateBeginner ✓
Weekly downloads43.9M↑2.0M
Latest versionv1.11.20v3.0.0
Recipes11

Tags

dayjs only

datetimeimmutablemomentformattingdayjstypescriptdate-formatting

Shared

datetime

pendulum only

timezoneutilitiesparsing

When to use each

dayjs

Use Day.js when you need date parsing, formatting, arithmetic (add/subtract days/months), or comparisons in browser code where bundle size matters. Its plugin system covers timezones, relative time ('3 hours ago'), duration, and ISO weeks.

pendulum

Scheduling apps, calendar features, time-series data across timezones, any app where DST bugs would be costly.

When to skip each

dayjs

For complex timezone-aware calendar applications, consider Temporal (the upcoming TC39 proposal) or date-fns with explicit timezone handling. Day.js's plugin system can grow large if you need many features.

pendulum

Simple UTC-only timestamps where datetime.now(timezone.utc) is sufficient. pendulum is heavier than stdlib.

Sample recipes

dayjs

  • Install dayjs

pendulum

  • Work with timezones safely