Easy human-readable date difference
This article presents a very simple method to show things like “20 seconds ago” or “3 weeks ago” or any other arbitrary date difference expressed in human-readable form in Javascript without relying on libraries like moment.js. The method applies to other programming languages as well, but may need adjustments depending on their quirks.