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

Download jQuery Plugin To Render Time In Users’ Timezone – usertime.js

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Render Time In Users’ Timezone – usertime.js, hope it will help you in programming stack.

jQuery Plugin To Render Time In Users Timezone usertime js - Download jQuery Plugin To Render Time In Users' Timezone - usertime.js
File Size: 7.37 KB
Views Total: 1370
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.

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

2. Include the usertime.js after jQuery library.

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

3. That’s it. The plugin will convert …

1 <usertime>1441099707112</usertime>
2 <usertime>2015-09-03T09:28:27+00:00</usertime>

to …

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

4. Customize the output format.

1 <usertime format="lll">1441099707112</usertime>
2  
3 <!-- output -->
4  
5 Sep 1, 2015 5:28 PM

Change log:

2016-08-26

  • Fixed MutationsObserver detection behavior.

2016-08-23

  • Added MutationObserver detection.

2015-10-24

  • Support turbolink.

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

source : jqueryscript.net