Skip to content

Commit

Permalink
fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Nov 27, 2014
1 parent e45b3a1 commit 7ebcb9d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
11 changes: 7 additions & 4 deletions build/gregorian-calendar-debug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2014, gregorian-calendar@1.0.4
Copyright 2014, gregorian-calendar@1.0.5
MIT Licensed
build time: Thu, 16 Oct 2014 06:56:35 GMT
build time: Thu, 27 Nov 2014 07:30:03 GMT
*/
modulex.add("gregorian-calendar", ["i18n!gregorian-calendar"], function(require, exports, module) {
var i18nGregorianCalendar = require("i18n!gregorian-calendar");
Expand Down Expand Up @@ -176,7 +176,10 @@ gregorianCalendar = function (exports) {
this.locale = locale;
this.fields = [];
this.time = undefined;
this.timezoneOffset = timezoneOffset || locale.timezoneOffset;
if (typeof timezoneOffset !== 'number') {
timezoneOffset = locale.timezoneOffset;
}
this.timezoneOffset = timezoneOffset;
this.firstDayOfWeek = locale.firstDayOfWeek;
this.minimalDaysInFirstWeek = locale.minimalDaysInFirstWeek;
this.fieldsComputed = false;
Expand Down Expand Up @@ -769,7 +772,7 @@ gregorianCalendar = function (exports) {
return fixedDate - mod(fixedDate - dayOfWeek, 7);
}
exports = GregorianCalendar;
GregorianCalendar.version = '1.0.4';
GregorianCalendar.version = '1.0.5';
GregorianCalendar.locales = { 'default': defaultLocale };
return exports;
}();
Expand Down
4 changes: 2 additions & 2 deletions build/gregorian-calendar-deps.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright 2014, gregorian-calendar@1.0.4
Copyright 2014, gregorian-calendar@1.0.5
MIT Licensed
build time: Thu, 16 Oct 2014 06:56:35 GMT
build time: Thu, 27 Nov 2014 07:30:03 GMT
*/
modulex.config("requires",{"gregorian-calendar":["i18n!gregorian-calendar"]});
4 changes: 2 additions & 2 deletions build/gregorian-calendar-deps.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright 2014, gregorian-calendar@1.0.4
Copyright 2014, gregorian-calendar@1.0.5
MIT Licensed
build time: Thu, 16 Oct 2014 06:56:35 GMT
build time: Thu, 27 Nov 2014 07:30:03 GMT
*/
{"gregorian-calendar":["i18n!gregorian-calendar"]}
2 changes: 1 addition & 1 deletion build/gregorian-calendar.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/gregorian-calendar/i18n/en-us-debug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2014, gregorian-calendar@1.0.4
Copyright 2014, gregorian-calendar@1.0.5
MIT Licensed
build time: Thu, 16 Oct 2014 06:56:35 GMT
build time: Thu, 27 Nov 2014 07:30:03 GMT
*/
modulex.add("gregorian-calendar/i18n/en-us",[], function(require, exports, module) {/**
* locale info for KISSY Date
Expand Down
4 changes: 2 additions & 2 deletions build/gregorian-calendar/i18n/zh-cn-debug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2014, gregorian-calendar@1.0.4
Copyright 2014, gregorian-calendar@1.0.5
MIT Licensed
build time: Thu, 16 Oct 2014 06:56:35 GMT
build time: Thu, 27 Nov 2014 07:30:03 GMT
*/
modulex.add("gregorian-calendar/i18n/zh-cn",[], function(require, exports, module) {/**
* locale info for KISSY Date
Expand Down
6 changes: 5 additions & 1 deletion lib/gregorian-calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ function GregorianCalendar(timezoneOffset, locale) {
* @type Number
* @protected
*/
this.timezoneOffset = timezoneOffset || locale.timezoneOffset;
if (typeof timezoneOffset !== 'number') {
timezoneOffset = locale.timezoneOffset;
}
this.timezoneOffset = timezoneOffset;

/**
* The first day of the week
* @type Number
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gregorian-calendar",
"version": "1.0.4",
"version": "1.0.5",
"author": "yiminghe <yiminghe@gmail.com>",
"engines": {
"node": "~0.11"
Expand Down

0 comments on commit 7ebcb9d

Please sign in to comment.