ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
2 lines • 8.58 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("date-fns/addMonths"),require("date-fns/addYears"),require("date-fns/differenceInCalendarDays"),require("date-fns/differenceInCalendarMonths"),require("date-fns/differenceInCalendarYears"),require("date-fns/differenceInHours"),require("date-fns/differenceInMinutes"),require("date-fns/differenceInSeconds"),require("date-fns/isFirstDayOfMonth"),require("date-fns/isLastDayOfMonth"),require("date-fns/isSameDay"),require("date-fns/isSameHour"),require("date-fns/isSameMinute"),require("date-fns/isSameMonth"),require("date-fns/isSameSecond"),require("date-fns/isSameYear"),require("date-fns/isToday"),require("date-fns/isValid"),require("date-fns/setDay"),require("date-fns/setMonth"),require("date-fns/setYear"),require("date-fns/startOfMonth"),require("date-fns/startOfWeek"),require("ng-zorro-antd/core/logger")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core/time",["exports","date-fns/addMonths","date-fns/addYears","date-fns/differenceInCalendarDays","date-fns/differenceInCalendarMonths","date-fns/differenceInCalendarYears","date-fns/differenceInHours","date-fns/differenceInMinutes","date-fns/differenceInSeconds","date-fns/isFirstDayOfMonth","date-fns/isLastDayOfMonth","date-fns/isSameDay","date-fns/isSameHour","date-fns/isSameMinute","date-fns/isSameMonth","date-fns/isSameSecond","date-fns/isSameYear","date-fns/isToday","date-fns/isValid","date-fns/setDay","date-fns/setMonth","date-fns/setYear","date-fns/startOfMonth","date-fns/startOfWeek","ng-zorro-antd/core/logger"],t):t(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].core=e["ng-zorro-antd"].core||{},e["ng-zorro-antd"].core.time={}),e.addMonths,e.addYears,e.differenceInCalendarDays,e.differenceInCalendarMonths,e.differenceInCalendarYears,e.differenceInHours,e.differenceInMinutes,e.differenceInSeconds,e.isFirstDayOfMonth,e.isLastDayOfMonth,e.isSameDay,e.isSameHour,e.isSameMinute,e.isSameMonth,e.isSameSecond,e.isSameYear,e.isToday,e.isValid,e.setDay,e.setMonth,e.setYear,e.startOfMonth,e.startOfWeek,e["ng-zorro-antd"].core.logger)}(this,(function(e,t,r,n,a,o,i,s,f,u,d,c,p,y,l,h,m,D,O,v,M,S,w,b,g){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i,s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,f=f&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p,y=y&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y,l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h,m=m&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m,D=D&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D,O=O&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O,v=v&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v,M=M&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M,S=S&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S,w=w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w,b=b&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b;function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}var q=function(){function e(e){if(e)if(e instanceof Date)this.nativeDate=e;else{if("string"!=typeof e&&"number"!=typeof e)throw new Error('The input date type is not supported ("Date" is now recommended)');g.warn('The string type is not recommended for date-picker, use "Date" type'),this.nativeDate=new Date(e)}else this.nativeDate=new Date}return e.prototype.calendarStart=function(t){return new e(b(w(this.nativeDate),t))},e.prototype.getYear=function(){return this.nativeDate.getFullYear()},e.prototype.getMonth=function(){return this.nativeDate.getMonth()},e.prototype.getDay=function(){return this.nativeDate.getDay()},e.prototype.getTime=function(){return this.nativeDate.getTime()},e.prototype.getDate=function(){return this.nativeDate.getDate()},e.prototype.getHours=function(){return this.nativeDate.getHours()},e.prototype.getMinutes=function(){return this.nativeDate.getMinutes()},e.prototype.getSeconds=function(){return this.nativeDate.getSeconds()},e.prototype.getMilliseconds=function(){return this.nativeDate.getMilliseconds()},e.prototype.clone=function(){return new e(new Date(this.nativeDate))},e.prototype.setHms=function(t,r,n){return new e(this.nativeDate.setHours(t,r,n))},e.prototype.setYear=function(t){return new e(S(this.nativeDate,t))},e.prototype.addYears=function(t){return new e(r(this.nativeDate,t))},e.prototype.setMonth=function(t){return new e(M(this.nativeDate,t))},e.prototype.addMonths=function(r){return new e(t(this.nativeDate,r))},e.prototype.setDay=function(t,r){return new e(v(this.nativeDate,t,r))},e.prototype.setDate=function(t){var r=new Date(this.nativeDate);return r.setDate(t),new e(r)},e.prototype.addDays=function(e){return this.setDate(this.getDate()+e)},e.prototype.isSame=function(e,t){var r;switch(void 0===t&&(t="day"),t){case"year":r=m;break;case"month":r=l;break;case"day":r=c;break;case"hour":r=p;break;case"minute":r=y;break;case"second":r=h;break;default:r=c}return r(this.nativeDate,this.toNativeDate(e))},e.prototype.isSameYear=function(e){return this.isSame(e,"year")},e.prototype.isSameMonth=function(e){return this.isSame(e,"month")},e.prototype.isSameDay=function(e){return this.isSame(e,"day")},e.prototype.isSameHour=function(e){return this.isSame(e,"hour")},e.prototype.isSameMinute=function(e){return this.isSame(e,"minute")},e.prototype.isSameSecond=function(e){return this.isSame(e,"second")},e.prototype.compare=function(e,t,r){if(void 0===t&&(t="day"),void 0===r&&(r=!0),null===e)return!1;var u;switch(t){case"year":u=o;break;case"month":u=a;break;case"day":u=n;break;case"hour":u=i;break;case"minute":u=s;break;case"second":u=f;break;default:u=n}return r?u(this.nativeDate,this.toNativeDate(e))<0:u(this.nativeDate,this.toNativeDate(e))>0},e.prototype.isBeforeYear=function(e){return this.compare(e,"year")},e.prototype.isBeforeMonth=function(e){return this.compare(e,"month")},e.prototype.isBeforeDay=function(e){return this.compare(e,"day")},e.prototype.isBeforeHour=function(e){return this.compare(e,"hour")},e.prototype.isBeforeMinute=function(e){return this.compare(e,"minute")},e.prototype.isBeforeSecond=function(e){return this.compare(e,"second")},e.prototype.isAfterYear=function(e){return this.compare(e,"year",!1)},e.prototype.isAfterMonth=function(e){return this.compare(e,"month",!1)},e.prototype.isAfterDay=function(e){return this.compare(e,"day",!1)},e.prototype.isAfterHour=function(e){return this.compare(e,"hour",!1)},e.prototype.isAfterMinute=function(e){return this.compare(e,"minute",!1)},e.prototype.isAfterSecond=function(e){return this.compare(e,"second",!1)},e.prototype.isToday=function(){return D(this.nativeDate)},e.prototype.isValid=function(){return O(this.nativeDate)},e.prototype.isFirstDayOfMonth=function(){return u(this.nativeDate)},e.prototype.isLastDayOfMonth=function(){return d(this.nativeDate)},e.prototype.toNativeDate=function(t){return t instanceof e?t.nativeDate:t},e}();e.CandyDate=q,e.cloneDate=function(e){return Array.isArray(e)?e.map((function(e){return e instanceof q?e.clone():null})):e instanceof q?e.clone():null},e.normalizeRangeValue=function(e){var t=j(e||[],2),r=t[0],n=t[1],a=r||new q,o=(null==n?void 0:n.isSameMonth(a))?n.addMonths(1):n||a.addMonths(1);return[a,o]},e.sortRangeValue=function(e){if(Array.isArray(e)){var t=j(e,2),r=t[0],n=t[1];return r&&n&&r.isAfterSecond(n)?[n,r]:[r,n]}return e},e.timeUnits=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ng-zorro-antd-core-time.umd.min.js.map