Skip to content

Commit

Permalink
Merge pull request #328 from jun66j5/dev
Browse files Browse the repository at this point in the history
Fixed typo for iso8601
  • Loading branch information
trentrichardson committed Feb 29, 2012
2 parents d33d08f + 06b9afe commit a446965
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jquery-ui-timepicker-addon.js
Expand Up @@ -88,7 +88,7 @@ function Timepicker() {
separator: ' ',
altFieldTimeOnly: true,
showTimepicker: true,
timezoneIso8609: false,
timezoneIso8601: false,
timezoneList: null,
addSliderAccess: false,
sliderAccessArgs: null
Expand Down Expand Up @@ -176,7 +176,7 @@ $.extend(Timepicker.prototype, {
var timezoneList = [];
for (var i = -11; i <= 12; i++)
timezoneList.push((i >= 0 ? '+' : '-') + ('0' + Math.abs(i).toString()).slice(-2) + '00');
if (tp_inst._defaults.timezoneIso8609)
if (tp_inst._defaults.timezoneIso8601)
timezoneList = $.map(timezoneList, function(val) {
return val == '+0000' ? 'Z' : (val.substring(0, 3) + ':' + val.substring(3));
});
Expand Down Expand Up @@ -284,16 +284,16 @@ $.extend(Timepicker.prototype, {
var tz = treg[order.z].toUpperCase();
switch (tz.length) {
case 1: // Z
tz = this._defaults.timezoneIso8609 ? 'Z' : '+0000';
tz = this._defaults.timezoneIso8601 ? 'Z' : '+0000';
break;
case 5: // +hhmm
if (this._defaults.timezoneIso8609)
if (this._defaults.timezoneIso8601)
tz = tz.substring(1) == '0000'
? 'Z'
: tz.substring(0, 3) + ':' + tz.substring(3);
break;
case 6: // +hh:mm
if (!this._defaults.timezoneIso8609)
if (!this._defaults.timezoneIso8601)
tz = tz == 'Z' || tz.substring(1) == '00:00'
? '+0000'
: tz.replace(/:/, '');
Expand Down Expand Up @@ -1102,7 +1102,7 @@ $.datepicker._gotoToday = function(id) {
tzoffset = Math.abs(tzoffset);
var tzmin = tzoffset % 60;
tzoffset = tzsign + ('0' + (tzoffset - tzmin) / 60).slice(-2) + ('0' + tzmin).slice(-2);
if (tp_inst._defaults.timezoneIso8609)
if (tp_inst._defaults.timezoneIso8601)
tzoffset = tzoffset.substring(0, 3) + ':' + tzoffset.substring(3);
tp_inst.timezone_select.val(tzoffset);
}
Expand Down

0 comments on commit a446965

Please sign in to comment.