Currently browsing JavaScript Time & Date

Friday, June 3, 2022

How to create time constants in JavaScript in a performant way

A recent project of mine required time constants, and instead of opting for an additional library for just 10 or…

Monday, May 16, 2022

Vanilla JavaScript table date sorting

Say we have a table with dates, in the following format: We want to sort this table dynamically based on…

Monday, May 16, 2022

How to add a top bar countdown for your next product sale

You can (probably) see this top bar right now, with a nice 30% off sale for my WordPress Lighthouse plugin.…

Monday, May 16, 2022

🍪 How to Expire localStorage Items and Replace Cookies

I don’t use 🍪 cookies anymore, I think they are too… rigid. I use localStorage items. By default, they don’t…

Friday, May 20, 2022

24-Hour Countdown with Progress Saving Using Vanilla JavaScript

Here’s an interesting JavaScript snippet allowing you to set a 24-hour countdown and save its progress, so that on the…

Monday, May 16, 2022

Date Countdown Using Vanilla JavaScript

A while ago, I coded several date countdowns for several promotions. These countdowns went straight inside a third-party popup solution,…