jQuery Plugin To Render Time In Users' Timezone - usertime.js

jQuery Plugin To Render Time In Users' Timezone - usertime.js
File Size: 7.37 KB
Views Total: 1466
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

usertime.js is an ultra-light time manipulation plugin that parses, formats and displays ISO 8601 date and Unix timestamp in users' timezone.

How to use it:

1. The plugin requires jQuery library and moment.js loaded in your document.

<script src="/path/to/jquery-1.11.3.min.js"></script>
<script src="/path/to/moment.min.js"></script>

2. Include the usertime.js after jQuery library.

<script src="/path/to/usertime.js"></script>

3. That's it. The plugin will convert ...


to ...

2015-09-01 17:28:27
2015-09-03 17:28:27

4. Customize the output format.

<usertime format="lll">1441099707112</usertime>

<!-- output -->

Sep 1, 2015 5:28 PM

Change log:


  • Fixed MutationsObserver detection behavior.


  • Added MutationObserver detection.


  • Support turbolink.

This awesome jQuery plugin is developed by emn178. For more Advanced Usages, please check the demo page or visit the official website.