Convert UTC Datetime Into Human Readable Format - UTC-time

Convert UTC Datetime Into Human Readable Format - UTC-time
File Size: 5.92 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

The UTC-time jQuery plugin automatically converts ISO formatted UTC time (last 60 days) into a human readable, auto updating string: x days/hours/minutes/seconds ago.

How to use it:

1. Insert the minified version of the jQuery UTC-time plugin after jQuery.

<script src="" 
<script src="dist/jquery-utc-time.min.js"></script>

2. Insert the UTC time into the data-utc-time attribute.

<p data-utc-time="11/07/2018 05:00:00 AM"></p>

3. Initialize the jQuery UTC-time plugin and done.

  daysAgo: ' Days Ago',
  hoursAgo: ' Hours Ago',
  minutesAgo: ' Minutes Ago',
  secondsAgo: ' Seconds Ago'

4. This will output the human readable time in the p.

<p data-utc-time="11/7/2018 05:00:00 AM">
  24 hours ago

5. If the the number of days you provide is greater than 60 days:

<!-- Converts ... -->
<p data-utc-time="11/7/2017 05:00:00 AM"></p>

<!-- Into ... -->
<p data-utc-time="11/7/2017 05:00:00 AM">

6. Change the default data attribute:

  attr: 'data-utc-time'

7. Customize the date format:

  format: 'yyyy MM dd hh:mm:ss',



  • v1.3.2: Fix an issue.


  • v1.3.0: support more features.


  • Bugfix


  • v2.1.0

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