Skip to content

It is a jQuery plugin that makes it easier to support elpase time expressing. e.g. 3 Hours 30 m 7 s .

Notifications You must be signed in to change notification settings

warrenwyf/jquery-timeelapse

Repository files navigation

jQuery Timeelapse Plugin

It is a jQuery plugin that makes it easier to support elpase time expressing. e.g. 3 Hours 30 m 7 s .

Usage

Load jQuery and this plugin first.

<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.timeelapse.min.js" type="text/javascript"></script>

Then you can use $.timeelapse to format pretty readable string.

<script type="text/javascript">
<!--
	$.timeelapse.settings.showMsecs = true; // Show milliseconds.
	$.timeelapse.settings.patterns = {			
		milliseconds : '%d毫秒',
		seconds: '%d秒',
		minutes: '%d分',
		hours: '%d小时',
		days: '%d天',
		years: '%d年',
		separator: ' '
	}; // Localization settings.
	var str = $.timeelapse(deltaMsecs);
//-->
</script>

About

It is a jQuery plugin that makes it easier to support elpase time expressing. e.g. 3 Hours 30 m 7 s .

Resources

Stars

Watchers

Forks

Packages

No packages published