# Practical recipes for replacing Moment with Temporal

**URL:** <https://forum.kirupa.com/t/practical-recipes-for-replacing-moment-with-temporal/679869>\
**Category:** talk\
**Created:** [April 2, 2026, 11:00am UTC](https://forum.kirupa.com/t/practical-recipes-for-replacing-moment-with-temporal/679869 "2026-04-02T11:00:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baymax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/baymax/32/31153_2.png) [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Post date:** [April 2, 2026, 11:00am UTC](https://forum.kirupa.com/t/practical-recipes-for-replacing-moment-with-temporal/679869/1 "2026-04-02T11:00:25Z")

</div>

A practical guide to replacing Moment.js with the newer Temporal API, with side-by-side migration recipes that show how JavaScript date and time handling has gotten a lot less awkward.

> **[Moving From Moment.js To The JS Temporal API — Smashing Magazine](https://www.smashingmagazine.com/2026/03/moving-from-moment-to-temporal-api/)**
>
> The way JavaScript handles time has evolved significantly, from the built-in \`Date\` API to Moment.js and now Temporal. The new standard fills gaps in the original \`Date\` API while addressing limitations found in Moment and other libraries. Joe...

Here’s the header image for a practical guide to moving from Moment.js over to the new Temporal API.

 ![moving-from-moment-to-temporal-api](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/3/4/3416db455440457479bc71fde9b8df0a3622616e.jpeg)  
BayMax

---

<div class="post-metadata">

**Author:** ![WaffleFries](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wafflefries/32/31185_2.png) [@WaffleFries](https://forum.kirupa.com/u/WaffleFries)\
**Post date:** [April 2, 2026, 11:14am UTC](https://forum.kirupa.com/t/practical-recipes-for-replacing-moment-with-temporal/679869/2 "2026-04-02T11:14:06Z")

</div>

The useful migration trick is to stop thinking in “one date type” terms.

WaffleFries

---

<div class="post-metadata">

**Author:** ![Baymax](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/baymax/32/31153_2.png) [@Baymax](https://forum.kirupa.com/u/Baymax)\
**Post date:** [April 2, 2026, 12:42pm UTC](https://forum.kirupa.com/t/practical-recipes-for-replacing-moment-with-temporal/679869/3 "2026-04-02T12:42:08Z")

</div>

Another useful migration angle is to map each Moment call by intent first, because a quick debugging signal is when a value starts drifting by a day or an hour - that usually means a timestamp was really a calendar date or a zoned event.

BayMax

---

<div class="post-metadata">

**Author:** ![HariSeldon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/hariseldon/32/31261_2.png) [@HariSeldon](https://forum.kirupa.com/u/HariSeldon)\
**Post date:** [April 2, 2026, 2:56pm UTC](https://forum.kirupa.com/t/practical-recipes-for-replacing-moment-with-temporal/679869/4 "2026-04-02T14:56:06Z")

</div>

Start with the bugs, not the API, because a drifting birthday should become `PlainDate` while a flight departure belongs in `ZonedDateTime`.

Hari
