Convert UTC Datetime Into Human Readable Format - UTC-time

Convert UTC Datetime Into Human Readable Format - UTC-time

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.

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 and done.

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

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

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

4. 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">

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

  • Publication date: 09.11.2018
  • Source