Tag

dayjs

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 8, 2025 · Frontend Development

Why Did My JavaScript Timestamp Show the Wrong Date? A Dayjs Debugging Guide

A developer discovers a bug where a time component displays incorrect dates because the backend switched timestamp values from numbers to strings, and learns how to correctly parse timestamps in JavaScript using Dayjs and defensive Number conversion.

Date ParsingJavaScriptdayjs
0 likes · 5 min read
Why Did My JavaScript Timestamp Show the Wrong Date? A Dayjs Debugging Guide
ByteFE
ByteFE
Jan 9, 2023 · Frontend Development

Understanding JavaScript Date Handling and Comparing Popular Date Libraries

This article examines why native JavaScript Date falls short for time handling, explains time measurement standards and time zones, and compares four major date libraries—MomentJS, DayJS, date-fns, and native Date—highlighting their advantages, drawbacks, and appropriate usage scenarios.

DateMomentJSdate-fns
0 likes · 12 min read
Understanding JavaScript Date Handling and Comparing Popular Date Libraries