If you've ever used something like PHP's date handling functions, JS is a huge let down in this area. Though I must admit I never got around to picking up a Date library. I built a small one to make some things easier, but now I know which ones to start using, thanks!
Vanilla JS lacks the comparable features PHP provides out of the box, or the features provided in these libraries. I actually wasn't referring to the file size either, my bad!
Marina Mosti is a full-stack web developer with over 14 years of experience in the field. She enjoys mentoring other women on JavaScript and her favorite framework, Vue.
If you've ever used something like PHP's date handling functions, JS is a huge let down in this area. Though I must admit I never got around to picking up a Date library. I built a small one to make some things easier, but now I know which ones to start using, thanks!
It's actually not huge at all, date-fns v2 introduces new lightFormat that supports most popular tokens and its size is only
887 B
.Vanilla JS lacks the comparable features PHP provides out of the box, or the features provided in these libraries. I actually wasn't referring to the file size either, my bad!
Gotcha 👌
I also come from a PHP background, and yeah libraries like Carbon are a must-have, but Moment and Date-fns really fill in the blanks :)