-
Notifications
You must be signed in to change notification settings - Fork 0
chmielu/timesince
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A JavaScript translation of the timesince function from Django/Python. timesince() converts Date objects to a human readable format which is a delta from the current time. Here is an example: '2 months, 3 days'. Put this snippet in an HTML page for an example of use: <script src="timesince.js"></script> <script> var now = new Date(); var d = new Date(now.getTime() - 3 * 60 * 60 * 1000); alert(d.timesince()); </script>
About
JavaScript translation of the Python/Django function timesince
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published