---
title: "iamkun/dayjs: ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API"
url: https://daily.dev/posts/iamkun-dayjs-day-js-2kb-immutable-date-time-library-alternative-to-moment-js-with-the-same-modern-nxa9vrxlk
source_url: https://github.com/iamkun/dayjs
type: article
source: "Pointer"
published: 2023-10-10T16:30:20.349Z
updated: 2023-10-10T16:29:23.465Z
tags: ["javascript", "github"]
reading_time: 2
upvotes: 50
comments: 2
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# iamkun/dayjs: ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

**[Pointer](https://daily.dev/sources/pointer)** · 2 min read · 50 upvotes · 2 comments

## Summary

Day.js is a minimalist JavaScript library for parsing, validating, manipulating, and displaying dates and times. It is a fast 2kB alternative to Moment.js with a similar API. Day.js is immutable, chainable, and supports internationalization. The library is compatible with all browsers.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/iamkun/dayjs>

## Community discussion

Top comments from developers on daily.dev.

**@yaireo** · 2 upvotes

> Reminds me of my [Relative-Time](https://github.com/yairEO/relative-time) package I made some years back, which weights less than half a kilobyte

**@alexitaylor** · 1 upvotes

> How does it compare to date-fns?

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#github](https://daily.dev/tags/github)

[View this post on daily.dev](https://daily.dev/posts/iamkun-dayjs-day-js-2kb-immutable-date-time-library-alternative-to-moment-js-with-the-same-modern-nxa9vrxlk)
