gregorian-calendar
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -767,3 +767,4 @@ modulex.add("gregorian-calendar", ["i18n!gregorian-calendar"], function(require, exports, module) { | ||
exports = GregorianCalendar; | ||
GregorianCalendar.version = '1.0.2'; | ||
GregorianCalendar.version = '1.0.3'; | ||
GregorianCalendar.locales = { 'default': defaultLocale }; | ||
return exports; | ||
@@ -770,0 +771,0 @@ }(); |
@@ -1,1 +0,1 @@ | ||
modulex.add("gregorian-calendar",["i18n!gregorian-calendar"],function(e,t,i){var s,r,n,a=e("i18n!gregorian-calendar");s=function(e){return e={SUNDAY:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11}}(),r=function(e){function t(t,i,s){return s+(e.isLeapYear(t)?f[i]:o[i])}function i(t){return t>=0?t%7:e.mod(t,7)}function r(t){var i,s,r,n,o,f,d,m,v;return i=t-1,o=a(i/c),s=e.mod(i,c),f=a(s/h),r=e.mod(s,h),d=a(r/l),n=e.mod(r,l),m=a(n/u),v=400*o+100*f+4*d+m,4!==f&&4!==m&&++v,v}e={};var n=s,a=Math.floor,o=[0,31,59,90,120,151,181,212,243,273,304,334],f=[0,31,60,91,121,152,182,213,244,274,305,335],u=365,l=1461,h=25*l-1,c=4*h+1,e=e={each:function(e,t){for(var i=0,s=e.length;s>i&&t(e[i],i,e)!==!1;i++);},mix:function(e,t){for(var i in t)e[i]=t[i]},isLeapYear:function(e){return 0!==(3&e)?!1:e%100!==0||e%400===0},mod:function(e,t){return e-t*a(e/t)},getFixedDate:function(e,i,s){var r=e-1;return u*r+a(r/4)-a(r/100)+a(r/400)+t(e,i,s)},getGregorianDateFromFixedDate:function(t){var s,a,u=r(t),l=e.getFixedDate(u,n.JANUARY,1),h=e.isLeapYear(u),c=h?f:o,d=t-l;for(a=0;a<c.length&&c[a]<=d;a++)s=a;var m=t-l-c[s]+1,v=i(t);return{year:u,month:s,dayOfMonth:m,dayOfWeek:v,isLeap:h}}};return e}(),n=function(t){function i(e,t){var i=[].slice.call(arguments,0);"object"==typeof e?(t=e,e=t.timezoneOffset):i.length>=3&&(e=t=null),t=t||h,this.locale=t,this.fields=[],this.time=void 0,this.timezoneOffset=e||t.timezoneOffset,this.firstDayOfWeek=t.firstDayOfWeek,this.minimalDaysInFirstWeek=t.minimalDaysInFirstWeek,this.fieldsComputed=!1,arguments.length>=3&&this.set.apply(this,i)}function n(e){var t=e.fields,i=t[O],s=t[g],r=o(i,s),n=t[E];n>r&&e.set(E,r)}function o(e,t){return b(e)?_[t]:R[t]}function f(e){return b(e)?366:365}function u(e,t,i){var s=l(t+6,e.firstDayOfWeek),r=s-t;r>=e.minimalDaysInFirstWeek&&(s-=7);var n=i-s;return L(n/7)+1}function l(e,t){return e-x(e-t,7)}var h,c=parseInt,d=r,m=e;h="undefined"!=typeof process?m("./gregorian-calendar/i18n/en-us"):a;var v=s;d.mix(i,v),d.mix(i,{Utils:d,isLeapYear:d.isLeapYear,YEAR:1,MONTH:2,DAY_OF_MONTH:3,HOUR_OF_DAY:4,MINUTES:5,SECONDS:6,MILLISECONDS:7,WEEK_OF_YEAR:8,WEEK_OF_MONTH:9,DAY_OF_YEAR:10,DAY_OF_WEEK:11,DAY_OF_WEEK_IN_MONTH:12,AM:0,PM:1});var D=["","Year","Month","DayOfMonth","HourOfDay","Minutes","Seconds","Milliseconds","WeekOfYear","WeekOfMonth","DayOfYear","DayOfWeek","DayOfWeekInMonth"],O=i.YEAR,g=i.MONTH,E=i.DAY_OF_MONTH,A=i.HOUR_OF_DAY,k=i.MINUTES,Y=i.SECONDS,y=i.MILLISECONDS,W=i.DAY_OF_WEEK_IN_MONTH,F=i.DAY_OF_YEAR,M=i.DAY_OF_WEEK,p=i.WEEK_OF_MONTH,S=i.WEEK_OF_YEAR,R=[31,28,31,30,31,30,31,31,30,31,30,31],_=[31,29,31,30,31,30,31,31,30,31,30,31],T=1e3,N=60*T,I=60*N,U=24*I,C=7*U,w=719163,x=d.mod,b=d.isLeapYear,L=Math.floor,z=[void 0,1,i.JANUARY,1,0,0,0,0,1,void 0,1,i.SUNDAY,1],H=[void 0,292278994,i.DECEMBER,void 0,23,59,59,999,void 0,void 0,void 0,i.SATURDAY,void 0];i.prototype={constructor:i,isLeapYear:function(){return b(this.getYear())},getLocale:function(){return this.locale},getActualMinimum:function(e){if(void 0!==z[e])return z[e];var t=this.fields;if(e===p){var s=new i(t[O],t[g],1);return s.get(p)}throw new Error("minimum value not defined!")},getActualMaximum:function(e){if(void 0!==H[e])return H[e];var t,s=this.fields;switch(e){case E:t=o(s[O],s[g]);break;case S:var r=new i(s[O],i.DECEMBER,31);t=r.get(S),1===t&&(t=52);break;case p:var n=new i(s[O],s[g],o(s[O],s[g]));t=n.get(p);break;case F:t=f(s[O]);break;case W:t=c((o(s[O],s[g])-1)/7)+1}if(void 0===t)throw new Error("maximum value not defined!");return t},isSet:function(e){return void 0!==this.fields[e]},computeFields:function(){var e=this.time,t=this.timezoneOffset*N,s=c(t/U),r=t%U;if(s+=c(e/U),r+=e%U,r>=U)r-=U,s++;else for(;0>r;)r+=U,s--;s+=w;var n=d.getGregorianDateFromFixedDate(s),a=n.year,o=this.fields;if(o[O]=a,o[g]=n.month,o[E]=n.dayOfMonth,o[M]=n.dayOfWeek,0!==r){o[A]=c(r/I);var h=r%I;o[k]=c(h/N),h%=N,o[Y]=c(h/T),o[y]=h%T}else o[A]=o[k]=o[Y]=o[y]=0;var m=d.getFixedDate(a,i.JANUARY,1),v=s-m+1,D=s-n.dayOfMonth+1;o[F]=v,o[W]=c((n.dayOfMonth-1)/7)+1;var R=u(this,m,s);if(0===R){var _=m-1,C=m-f(a-1);R=u(this,C,_)}else if(R>=52){var x=m+f(a),b=l(x+6,this.firstDayOfWeek),L=b-x;L>=this.minimalDaysInFirstWeek&&s>=b-7&&(R=1)}o[S]=R,o[p]=u(this,D,s),this.fieldsComputed=!0},computeTime:function(){if(!this.isSet(O))throw new Error("year must be set for KISSY GregorianCalendar");var e=this.fields,t=e[O],i=0;this.isSet(A)&&(i+=e[A]),i*=60,i+=e[k]||0,i*=60,i+=e[Y]||0,i*=1e3,i+=e[y]||0;var s=0;e[O]=t,s+=this.getFixedDate();var r=(s-w)*U+i;r-=this.timezoneOffset*N,this.time=r,this.computeFields()},complete:function(){void 0===this.time&&this.computeTime(),this.fieldsComputed||this.computeFields()},getFixedDate:function(){var e=this,t=e.fields,s=e.firstDayOfWeek,r=t[O],n=i.JANUARY;e.isSet(g)&&(n=t[g],n>i.DECEMBER?(r+=c(n/12),n%=12):n<i.JANUARY&&(r+=L(n/12),n=x(n,12)));var a,f=d.getFixedDate(r,n,1),u=e.firstDayOfWeek;if(e.isSet(M)&&(u=t[M]),e.isSet(g))if(e.isSet(E))f+=t[E]-1;else if(e.isSet(p))a=l(f+6,s),a-f>=e.minimalDaysInFirstWeek&&(a-=7),u!==s&&(a=l(a+6,u)),f=a+7*(t[p]-1);else{var h;h=e.isSet(W)?t[W]:1;var m=7*h;0>h&&(m=o(r,n)+7*(h+1)),f=l(f+m-1,u)}else e.isSet(F)?f+=t[F]-1:(a=l(f+6,s),a-f>=e.minimalDaysInFirstWeek&&(a-=7),u!==s&&(a=l(a+6,u)),f=a+7*(t[S]-1));return f},getTime:function(){return void 0===this.time&&this.computeTime(),this.time},setTime:function(e){this.time=e,this.fieldsComputed=!1,this.complete()},get:function(e){return this.complete(),this.fields[e]},set:function(e,t){var i=arguments.length;if(2===i)this.fields[e]=t;else{if(!(y+1>i))throw new Error("illegal arguments for KISSY GregorianCalendar set");for(var s=0;i>s;s++)this.fields[O+s]=arguments[s]}this.time=void 0},add:function(e,t){if(t){var i=this,s=i.fields,r=i.get(e);if(e===O)r+=t,i.set(O,r),n(i);else if(e===g){r+=t;var a=L(r/12);r=x(r,12),a&&i.set(O,s[O]+a),i.set(g,r),n(i)}else{switch(e){case A:t*=I;break;case k:t*=N;break;case Y:t*=T;break;case y:break;case p:case S:case W:t*=C;break;case M:case F:case E:t*=U;break;default:throw new Error("illegal field for add")}i.setTime(i.time+t)}}},getRolledValue:function(e,t,i,s){var r=e-i,n=s-i+1;return t%=n,i+(r+t+n)%n},roll:function(e,t){if(t){var i=this,s=i.get(e),r=i.getActualMinimum(e),a=i.getActualMaximum(e);switch(s=i.getRolledValue(s,t,r,a),i.set(e,s),e){case g:n(i);break;default:i.updateFieldsBySet(e)}}},updateFieldsBySet:function(e){var t=this.fields;switch(e){case p:t[E]=void 0;break;case F:t[g]=void 0;break;case M:t[E]=void 0;break;case S:t[F]=void 0,t[g]=void 0}},getTimezoneOffset:function(){return this.timezoneOffset},setTimezoneOffset:function(e){this.timezoneOffset!==e&&(this.fieldsComputed=void 0,this.timezoneOffset=e)},setFirstDayOfWeek:function(e){this.firstDayOfWeek!==e&&(this.firstDayOfWeek=e,this.fieldsComputed=!1)},getFirstDayOfWeek:function(){return this.firstDayOfWeek},setMinimalDaysInFirstWeek:function(e){this.minimalDaysInFirstWeek!==e&&(this.minimalDaysInFirstWeek=e,this.fieldsComputed=!1)},getMinimalDaysInFirstWeek:function(){return this.minimalDaysInFirstWeek},getWeeksInWeekYear:function(){var e=this.getWeekYear();if(e===this.get(O))return this.getActualMaximum(S);var t=this.clone();return t.setWeekDate(e,2,this.get(M)),t.getActualMaximum(S)},getWeekYear:function(){var e=this.get(O),t=this.get(S),s=this.get(g);return s===i.JANUARY?t>=52&&--e:s===i.DECEMBER&&1===t&&++e,e},setWeekDate:function(e,t,s){if(s<i.SUNDAY||s>i.SATURDAY)throw new Error("invalid dayOfWeek: "+s);var r=this.fields,n=this.clone();n.clear(),n.setTimezoneOffset(0),n.set(O,e),n.set(S,1),n.set(M,this.getFirstDayOfWeek());var a=s-this.getFirstDayOfWeek();0>a&&(a+=7),a+=7*(t-1),0!==a?n.add(F,a):n.complete(),r[O]=n.get(O),r[g]=n.get(g),r[E]=n.get(E),this.complete()},clone:function(){void 0===this.time&&this.computeTime();var e=new i(this.timezoneOffset,this.locale);return e.setTime(this.time),e},equals:function(e){return this.getTime()===e.getTime()&&this.firstDayOfWeek===e.firstDayOfWeek&&this.timezoneOffset===e.timezoneOffset&&this.minimalDaysInFirstWeek===e.minimalDaysInFirstWeek},clear:function(e){void 0===e?this.field=[]:this.fields[e]=void 0,this.time=void 0,this.fieldsComputed=!1}};var B=i.prototype;return d.each(D,function(e,t){e&&(B["get"+e]=function(){return this.get(t)},B["isSet"+e]=function(){return this.isSet(t)},B["set"+e]=function(e){return this.set(t,e)},B["add"+e]=function(e){return this.add(t,e)},B["roll"+e]=function(e){return this.roll(t,e)})}),t=i,i.version="1.0.2",t}(),i.exports=n}); | ||
modulex.add("gregorian-calendar",["i18n!gregorian-calendar"],function(e,t,i){var s,r,n,a=e("i18n!gregorian-calendar");s=function(e){return e={SUNDAY:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11}}(),r=function(e){function t(t,i,s){return s+(e.isLeapYear(t)?f[i]:o[i])}function i(t){return t>=0?t%7:e.mod(t,7)}function r(t){var i,s,r,n,o,f,d,m,v;return i=t-1,o=a(i/c),s=e.mod(i,c),f=a(s/h),r=e.mod(s,h),d=a(r/l),n=e.mod(r,l),m=a(n/u),v=400*o+100*f+4*d+m,4!==f&&4!==m&&++v,v}e={};var n=s,a=Math.floor,o=[0,31,59,90,120,151,181,212,243,273,304,334],f=[0,31,60,91,121,152,182,213,244,274,305,335],u=365,l=1461,h=25*l-1,c=4*h+1,e=e={each:function(e,t){for(var i=0,s=e.length;s>i&&t(e[i],i,e)!==!1;i++);},mix:function(e,t){for(var i in t)e[i]=t[i]},isLeapYear:function(e){return 0!==(3&e)?!1:e%100!==0||e%400===0},mod:function(e,t){return e-t*a(e/t)},getFixedDate:function(e,i,s){var r=e-1;return u*r+a(r/4)-a(r/100)+a(r/400)+t(e,i,s)},getGregorianDateFromFixedDate:function(t){var s,a,u=r(t),l=e.getFixedDate(u,n.JANUARY,1),h=e.isLeapYear(u),c=h?f:o,d=t-l;for(a=0;a<c.length&&c[a]<=d;a++)s=a;var m=t-l-c[s]+1,v=i(t);return{year:u,month:s,dayOfMonth:m,dayOfWeek:v,isLeap:h}}};return e}(),n=function(t){function i(e,t){var i=[].slice.call(arguments,0);"object"==typeof e?(t=e,e=t.timezoneOffset):i.length>=3&&(e=t=null),t=t||h,this.locale=t,this.fields=[],this.time=void 0,this.timezoneOffset=e||t.timezoneOffset,this.firstDayOfWeek=t.firstDayOfWeek,this.minimalDaysInFirstWeek=t.minimalDaysInFirstWeek,this.fieldsComputed=!1,arguments.length>=3&&this.set.apply(this,i)}function n(e){var t=e.fields,i=t[O],s=t[g],r=o(i,s),n=t[E];n>r&&e.set(E,r)}function o(e,t){return b(e)?_[t]:R[t]}function f(e){return b(e)?366:365}function u(e,t,i){var s=l(t+6,e.firstDayOfWeek),r=s-t;r>=e.minimalDaysInFirstWeek&&(s-=7);var n=i-s;return L(n/7)+1}function l(e,t){return e-x(e-t,7)}var h,c=parseInt,d=r,m=e;h="undefined"!=typeof process?m("./gregorian-calendar/i18n/en-us"):a;var v=s;d.mix(i,v),d.mix(i,{Utils:d,isLeapYear:d.isLeapYear,YEAR:1,MONTH:2,DAY_OF_MONTH:3,HOUR_OF_DAY:4,MINUTES:5,SECONDS:6,MILLISECONDS:7,WEEK_OF_YEAR:8,WEEK_OF_MONTH:9,DAY_OF_YEAR:10,DAY_OF_WEEK:11,DAY_OF_WEEK_IN_MONTH:12,AM:0,PM:1});var D=["","Year","Month","DayOfMonth","HourOfDay","Minutes","Seconds","Milliseconds","WeekOfYear","WeekOfMonth","DayOfYear","DayOfWeek","DayOfWeekInMonth"],O=i.YEAR,g=i.MONTH,E=i.DAY_OF_MONTH,A=i.HOUR_OF_DAY,k=i.MINUTES,Y=i.SECONDS,y=i.MILLISECONDS,W=i.DAY_OF_WEEK_IN_MONTH,F=i.DAY_OF_YEAR,M=i.DAY_OF_WEEK,p=i.WEEK_OF_MONTH,S=i.WEEK_OF_YEAR,R=[31,28,31,30,31,30,31,31,30,31,30,31],_=[31,29,31,30,31,30,31,31,30,31,30,31],T=1e3,N=60*T,I=60*N,U=24*I,C=7*U,w=719163,x=d.mod,b=d.isLeapYear,L=Math.floor,z=[void 0,1,i.JANUARY,1,0,0,0,0,1,void 0,1,i.SUNDAY,1],H=[void 0,292278994,i.DECEMBER,void 0,23,59,59,999,void 0,void 0,void 0,i.SATURDAY,void 0];i.prototype={constructor:i,isLeapYear:function(){return b(this.getYear())},getLocale:function(){return this.locale},getActualMinimum:function(e){if(void 0!==z[e])return z[e];var t=this.fields;if(e===p){var s=new i(t[O],t[g],1);return s.get(p)}throw new Error("minimum value not defined!")},getActualMaximum:function(e){if(void 0!==H[e])return H[e];var t,s=this.fields;switch(e){case E:t=o(s[O],s[g]);break;case S:var r=new i(s[O],i.DECEMBER,31);t=r.get(S),1===t&&(t=52);break;case p:var n=new i(s[O],s[g],o(s[O],s[g]));t=n.get(p);break;case F:t=f(s[O]);break;case W:t=c((o(s[O],s[g])-1)/7)+1}if(void 0===t)throw new Error("maximum value not defined!");return t},isSet:function(e){return void 0!==this.fields[e]},computeFields:function(){var e=this.time,t=this.timezoneOffset*N,s=c(t/U),r=t%U;if(s+=c(e/U),r+=e%U,r>=U)r-=U,s++;else for(;0>r;)r+=U,s--;s+=w;var n=d.getGregorianDateFromFixedDate(s),a=n.year,o=this.fields;if(o[O]=a,o[g]=n.month,o[E]=n.dayOfMonth,o[M]=n.dayOfWeek,0!==r){o[A]=c(r/I);var h=r%I;o[k]=c(h/N),h%=N,o[Y]=c(h/T),o[y]=h%T}else o[A]=o[k]=o[Y]=o[y]=0;var m=d.getFixedDate(a,i.JANUARY,1),v=s-m+1,D=s-n.dayOfMonth+1;o[F]=v,o[W]=c((n.dayOfMonth-1)/7)+1;var R=u(this,m,s);if(0===R){var _=m-1,C=m-f(a-1);R=u(this,C,_)}else if(R>=52){var x=m+f(a),b=l(x+6,this.firstDayOfWeek),L=b-x;L>=this.minimalDaysInFirstWeek&&s>=b-7&&(R=1)}o[S]=R,o[p]=u(this,D,s),this.fieldsComputed=!0},computeTime:function(){if(!this.isSet(O))throw new Error("year must be set for KISSY GregorianCalendar");var e=this.fields,t=e[O],i=0;this.isSet(A)&&(i+=e[A]),i*=60,i+=e[k]||0,i*=60,i+=e[Y]||0,i*=1e3,i+=e[y]||0;var s=0;e[O]=t,s+=this.getFixedDate();var r=(s-w)*U+i;r-=this.timezoneOffset*N,this.time=r,this.computeFields()},complete:function(){void 0===this.time&&this.computeTime(),this.fieldsComputed||this.computeFields()},getFixedDate:function(){var e=this,t=e.fields,s=e.firstDayOfWeek,r=t[O],n=i.JANUARY;e.isSet(g)&&(n=t[g],n>i.DECEMBER?(r+=c(n/12),n%=12):n<i.JANUARY&&(r+=L(n/12),n=x(n,12)));var a,f=d.getFixedDate(r,n,1),u=e.firstDayOfWeek;if(e.isSet(M)&&(u=t[M]),e.isSet(g))if(e.isSet(E))f+=t[E]-1;else if(e.isSet(p))a=l(f+6,s),a-f>=e.minimalDaysInFirstWeek&&(a-=7),u!==s&&(a=l(a+6,u)),f=a+7*(t[p]-1);else{var h;h=e.isSet(W)?t[W]:1;var m=7*h;0>h&&(m=o(r,n)+7*(h+1)),f=l(f+m-1,u)}else e.isSet(F)?f+=t[F]-1:(a=l(f+6,s),a-f>=e.minimalDaysInFirstWeek&&(a-=7),u!==s&&(a=l(a+6,u)),f=a+7*(t[S]-1));return f},getTime:function(){return void 0===this.time&&this.computeTime(),this.time},setTime:function(e){this.time=e,this.fieldsComputed=!1,this.complete()},get:function(e){return this.complete(),this.fields[e]},set:function(e,t){var i=arguments.length;if(2===i)this.fields[e]=t;else{if(!(y+1>i))throw new Error("illegal arguments for KISSY GregorianCalendar set");for(var s=0;i>s;s++)this.fields[O+s]=arguments[s]}this.time=void 0},add:function(e,t){if(t){var i=this,s=i.fields,r=i.get(e);if(e===O)r+=t,i.set(O,r),n(i);else if(e===g){r+=t;var a=L(r/12);r=x(r,12),a&&i.set(O,s[O]+a),i.set(g,r),n(i)}else{switch(e){case A:t*=I;break;case k:t*=N;break;case Y:t*=T;break;case y:break;case p:case S:case W:t*=C;break;case M:case F:case E:t*=U;break;default:throw new Error("illegal field for add")}i.setTime(i.time+t)}}},getRolledValue:function(e,t,i,s){var r=e-i,n=s-i+1;return t%=n,i+(r+t+n)%n},roll:function(e,t){if(t){var i=this,s=i.get(e),r=i.getActualMinimum(e),a=i.getActualMaximum(e);switch(s=i.getRolledValue(s,t,r,a),i.set(e,s),e){case g:n(i);break;default:i.updateFieldsBySet(e)}}},updateFieldsBySet:function(e){var t=this.fields;switch(e){case p:t[E]=void 0;break;case F:t[g]=void 0;break;case M:t[E]=void 0;break;case S:t[F]=void 0,t[g]=void 0}},getTimezoneOffset:function(){return this.timezoneOffset},setTimezoneOffset:function(e){this.timezoneOffset!==e&&(this.fieldsComputed=void 0,this.timezoneOffset=e)},setFirstDayOfWeek:function(e){this.firstDayOfWeek!==e&&(this.firstDayOfWeek=e,this.fieldsComputed=!1)},getFirstDayOfWeek:function(){return this.firstDayOfWeek},setMinimalDaysInFirstWeek:function(e){this.minimalDaysInFirstWeek!==e&&(this.minimalDaysInFirstWeek=e,this.fieldsComputed=!1)},getMinimalDaysInFirstWeek:function(){return this.minimalDaysInFirstWeek},getWeeksInWeekYear:function(){var e=this.getWeekYear();if(e===this.get(O))return this.getActualMaximum(S);var t=this.clone();return t.setWeekDate(e,2,this.get(M)),t.getActualMaximum(S)},getWeekYear:function(){var e=this.get(O),t=this.get(S),s=this.get(g);return s===i.JANUARY?t>=52&&--e:s===i.DECEMBER&&1===t&&++e,e},setWeekDate:function(e,t,s){if(s<i.SUNDAY||s>i.SATURDAY)throw new Error("invalid dayOfWeek: "+s);var r=this.fields,n=this.clone();n.clear(),n.setTimezoneOffset(0),n.set(O,e),n.set(S,1),n.set(M,this.getFirstDayOfWeek());var a=s-this.getFirstDayOfWeek();0>a&&(a+=7),a+=7*(t-1),0!==a?n.add(F,a):n.complete(),r[O]=n.get(O),r[g]=n.get(g),r[E]=n.get(E),this.complete()},clone:function(){void 0===this.time&&this.computeTime();var e=new i(this.timezoneOffset,this.locale);return e.setTime(this.time),e},equals:function(e){return this.getTime()===e.getTime()&&this.firstDayOfWeek===e.firstDayOfWeek&&this.timezoneOffset===e.timezoneOffset&&this.minimalDaysInFirstWeek===e.minimalDaysInFirstWeek},clear:function(e){void 0===e?this.field=[]:this.fields[e]=void 0,this.time=void 0,this.fieldsComputed=!1}};var B=i.prototype;return d.each(D,function(e,t){e&&(B["get"+e]=function(){return this.get(t)},B["isSet"+e]=function(){return this.isSet(t)},B["set"+e]=function(e){return this.set(t,e)},B["add"+e]=function(e){return this.add(t,e)},B["roll"+e]=function(e){return this.roll(t,e)})}),t=i,i.version="1.0.3",i.locales={"default":h},t}(),i.exports=n}); |
module.exports = require('./lib/gregorian-calendar'); | ||
module.exports.locales = { | ||
'en-us': require('./lib/gregorian-calendar/i18n/en-us'), | ||
'zh-cn': require('./lib/gregorian-calendar/i18n/zh-cn') | ||
}; | ||
module.exports.locales['en-us'] = require('./lib/gregorian-calendar/i18n/en-us'); | ||
module.exports.locales['zh-cn'] = require('./lib/gregorian-calendar/i18n/zh-cn'); | ||
module.exports.version = require('./package.json').version; |
@@ -1340,2 +1340,5 @@ /** | ||
GregorianCalendar.version = '@VERSION@'; | ||
GregorianCalendar.locales = { | ||
'default': defaultLocale | ||
}; | ||
/* | ||
@@ -1342,0 +1345,0 @@ http://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html |
{ | ||
"name": "gregorian-calendar", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "yiminghe <yiminghe@gmail.com>", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113500
2700