Tagged articles
4 articles
Page 1 of 1
Goodme Frontend Team
Goodme Frontend Team
Oct 28, 2024 · Frontend Development

Preventing Day.js Locale Pollution in Large Frontend Projects with Static Analysis

This article recounts a date‑misalignment bug caused by an unintended Day.js locale change in a mini‑program, explains why the global locale must remain unique, and details a comprehensive static‑analysis solution using ESLint, custom Webpack loaders, and Babel plugins to intercept and block Day.js locale modifications at compile time.

DayjsESLintfrontend
0 likes · 22 min read
Preventing Day.js Locale Pollution in Large Frontend Projects with Static Analysis
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.

DayjsJavaScriptMomentJS
0 likes · 12 min read
Understanding JavaScript Date Handling and Comparing Popular Date Libraries
ELab Team
ELab Team
Mar 17, 2021 · Frontend Development

Mastering Time in JavaScript: From Unix Timestamps to Modern Date Libraries

This article explains the history of global time standards, how computers represent time with Unix timestamps and the 2038 problem, details ISO 8601 and RFC 2822 formats, and provides practical JavaScript Date usage examples along with comparisons of popular date‑handling libraries such as Moment.js, Dayjs, and Miment.

DayjsJavaScriptdate
0 likes · 22 min read
Mastering Time in JavaScript: From Unix Timestamps to Modern Date Libraries