Skip to content

Commit

Permalink
Merge branch 'master' of github.com:andrewplummer/Sugar
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewplummer committed Oct 17, 2012
2 parents 8239502 + 86f1b34 commit ddac06a
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 22 deletions.
6 changes: 6 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "sugar",
"version": "1.3.5",
"main": "./release/1.3.5/sugar-1.3.5.min.js",
"dependencies": {}
}
6 changes: 4 additions & 2 deletions lib/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

var TimeFormat = ['ampm','hour','minute','second','ampm','utc','offset_sign','offset_hours','offset_minutes','ampm']
var DecimalReg = '(?:[,.]\\d+)?';
var HoursReg = '2[0-4]|[01]?\\d' + DecimalReg;
var HoursReg = '\\d{1,2}' + DecimalReg;
var SixtyReg = '[0-5]\\d' + DecimalReg;
var RequiredTime = '({t})?\\s*('+HoursReg+')(?:{h}('+SixtyReg+')?{m}(?::?('+SixtyReg+'){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))';

Expand Down Expand Up @@ -1032,7 +1032,9 @@
// (or 29th in the case of a leap year).

function checkMonthTraversal(date, targetMonth) {
if(targetMonth < 0) targetMonth += 12;
if(targetMonth < 0) {
targetMonth = targetMonth % 12 + 12;
}
if(targetMonth % 12 != callDateGet(date, 'Month')) {
callDateSet(date, 'Date', 0);
}
Expand Down
6 changes: 4 additions & 2 deletions release/edge/precompiled/development/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

var TimeFormat = ['ampm','hour','minute','second','ampm','utc','offset_sign','offset_hours','offset_minutes','ampm']
var DecimalReg = '(?:[,.]\\d+)?';
var HoursReg = '2[0-4]|[01]?\\d' + DecimalReg;
var HoursReg = '\\d{1,2}' + DecimalReg;
var SixtyReg = '[0-5]\\d' + DecimalReg;
var RequiredTime = '({t})?\\s*('+HoursReg+')(?:{h}('+SixtyReg+')?{m}(?::?('+SixtyReg+'){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))';

Expand Down Expand Up @@ -1032,7 +1032,9 @@
// (or 29th in the case of a leap year).

function checkMonthTraversal(date, targetMonth) {
if(targetMonth < 0) targetMonth += 12;
if(targetMonth < 0) {
targetMonth = targetMonth % 12 + 12;
}
if(targetMonth % 12 != callDateGet(date, 'Month')) {
callDateSet(date, 'Date', 0);
}
Expand Down
10 changes: 5 additions & 5 deletions release/edge/precompiled/minified/date.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions release/edge/sugar-edge-full.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@

var TimeFormat = ['ampm','hour','minute','second','ampm','utc','offset_sign','offset_hours','offset_minutes','ampm']
var DecimalReg = '(?:[,.]\\d+)?';
var HoursReg = '2[0-4]|[01]?\\d' + DecimalReg;
var HoursReg = '\\d{1,2}' + DecimalReg;
var SixtyReg = '[0-5]\\d' + DecimalReg;
var RequiredTime = '({t})?\\s*('+HoursReg+')(?:{h}('+SixtyReg+')?{m}(?::?('+SixtyReg+'){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))';

Expand Down Expand Up @@ -3069,7 +3069,9 @@
// (or 29th in the case of a leap year).

function checkMonthTraversal(date, targetMonth) {
if(targetMonth < 0) targetMonth += 12;
if(targetMonth < 0) {
targetMonth = targetMonth % 12 + 12;
}
if(targetMonth % 12 != callDateGet(date, 'Month')) {
callDateSet(date, 'Date', 0);
}
Expand Down
Loading

0 comments on commit ddac06a

Please sign in to comment.