Category: dates

Introduction to date-fns – a Lightweight JavaScript Date Library

Working with dates in JavaScript is a pain. Native date methods are often verbose and occasionally inconsistent — something which also makes them error-prone. But good news is at hand. There are several libraries that exist to take the pain out of date manipulation. These libraries are to JavaScript dates, what jQu...

Suggesting Carbon with Composer – Date and Time the Right Way

Carbon is a small library for date and time manipulation in PHP. It relies on and extends the core DateTime class, adding helpful methods for a significantly saner experience. In this article, we’ll take a look at some basic usage examples, and then use it in a real project. Introduction Carbon is just a class which...

Build a Countdown Timer in Just 18 Lines of JavaScript

Sometimes in life, you’re going to need a JavaScript countdown clock for something other than a doomsday device. Whether you have an event, a sale, a promotion, or a game, you can benefit from building a clock in raw JavaScript rather than reaching for the nearest plugin. While there are many great clock plugins, h...