@livelybone/date-generator
Version:
A module that generates calendar, which includes years, months, dates, hours, minutes, seconds
10 lines (8 loc) • 1.23 kB
JavaScript
/**
* Bundle of @livelybone/date-generator
* Generated: 2020-05-17
* Version: 4.2.1
* License: MIT
* Author: 2631541504@qq.com
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).clockDateGenerator={})}(this,function(e){"use strict";var t,n,a,r;function i(e,t,n){var a=2<arguments.length&&void 0!==n?n:"0";return void 0===a&&(a="0"),0<(e-=(t=t.toString()).length)?new Array(e+(/\./.test(t)?2:1)).join(a)+t:t}function o(h){return function(e){for(var t=Math.ceil(Math.abs(e&&e.interval||1)),n=Math.ceil(Math.abs(e&&e.min||0)),a=Math.ceil(Math.abs(e&&e.max||h-1)),r=[],o=0;o<=h;o+=t)r.push({value:i(2,o),max:h,canBeChose:n<=o&&o<=a});return r}}(n=t=t||{})[n.Hour=23]="Hour",n[n.Minute=59]="Minute",n[n.Second=59]="Second",(r=a=a||{})[r.GreatThanYear=100]="GreatThanYear",r[r.GreatThanMonth=10]="GreatThanMonth",r[r.GreatThanDate=1]="GreatThanDate",r[r.Equal=0]="Equal",r[r.LessThanDate=-1]="LessThanDate",r[r.LessThanMonth=-10]="LessThanMonth",r[r.LessThanYear=-100]="LessThanYear";var h=o(t.Hour),s=o(t.Minute),u=o(t.Second);e.getHour=h,e.getMinute=s,e.getSecond=u,Object.defineProperty(e,"__esModule",{value:!0})});