diff --git a/build/development/date-af-ZA.js b/build/development/date-af-ZA.js index ab9fd6a7..ed12ed40 100644 --- a/build/development/date-af-ZA.js +++ b/build/development/date-af-ZA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "af-ZA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "af-ZA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "af-ZA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "af-ZA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-AE.js b/build/development/date-ar-AE.js index 6a71bce7..601b5948 100644 --- a/build/development/date-ar-AE.js +++ b/build/development/date-ar-AE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-AE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-AE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-AE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-AE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-BH.js b/build/development/date-ar-BH.js index 7a5b374b..d90685f6 100644 --- a/build/development/date-ar-BH.js +++ b/build/development/date-ar-BH.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-BH"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-BH"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-BH"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-BH"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-DZ.js b/build/development/date-ar-DZ.js index 1ae812f3..7b170fde 100644 --- a/build/development/date-ar-DZ.js +++ b/build/development/date-ar-DZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-DZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-DZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-DZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-DZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-EG.js b/build/development/date-ar-EG.js index 6e5b390f..74d4cd9d 100644 --- a/build/development/date-ar-EG.js +++ b/build/development/date-ar-EG.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-EG"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-EG"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-EG"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-EG"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-IQ.js b/build/development/date-ar-IQ.js index 0e8083cd..79283824 100644 --- a/build/development/date-ar-IQ.js +++ b/build/development/date-ar-IQ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-IQ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-IQ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-IQ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-IQ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-JO.js b/build/development/date-ar-JO.js index 0c709423..15cd3932 100644 --- a/build/development/date-ar-JO.js +++ b/build/development/date-ar-JO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-JO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-JO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-JO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-JO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-KW.js b/build/development/date-ar-KW.js index a80a23d3..603d9a27 100644 --- a/build/development/date-ar-KW.js +++ b/build/development/date-ar-KW.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-KW"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-KW"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-KW"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-KW"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-LB.js b/build/development/date-ar-LB.js index 1274f612..58846103 100644 --- a/build/development/date-ar-LB.js +++ b/build/development/date-ar-LB.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-LB"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-LB"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-LB"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-LB"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-LY.js b/build/development/date-ar-LY.js index 28658c10..4251e8c3 100644 --- a/build/development/date-ar-LY.js +++ b/build/development/date-ar-LY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-LY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-LY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-LY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-LY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-MA.js b/build/development/date-ar-MA.js index 37b886cd..16423a9d 100644 --- a/build/development/date-ar-MA.js +++ b/build/development/date-ar-MA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-MA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-MA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-MA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-MA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-OM.js b/build/development/date-ar-OM.js index 3c069faf..bc91eca6 100644 --- a/build/development/date-ar-OM.js +++ b/build/development/date-ar-OM.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-OM"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-OM"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-OM"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-OM"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-QA.js b/build/development/date-ar-QA.js index 2d7dbd5c..889ee0ad 100644 --- a/build/development/date-ar-QA.js +++ b/build/development/date-ar-QA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-QA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-QA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-QA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-QA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-SA.js b/build/development/date-ar-SA.js index 81d6b13d..81e38776 100644 --- a/build/development/date-ar-SA.js +++ b/build/development/date-ar-SA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-SA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-SA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-SA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-SA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-SY.js b/build/development/date-ar-SY.js index 29d33091..3aa3c1f0 100644 --- a/build/development/date-ar-SY.js +++ b/build/development/date-ar-SY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-SY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-SY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-SY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-SY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-TN.js b/build/development/date-ar-TN.js index c65ba0e0..e17fc253 100644 --- a/build/development/date-ar-TN.js +++ b/build/development/date-ar-TN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-TN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-TN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-TN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-TN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ar-YE.js b/build/development/date-ar-YE.js index 4f162545..bad9384f 100644 --- a/build/development/date-ar-YE.js +++ b/build/development/date-ar-YE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ar-YE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ar-YE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ar-YE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ar-YE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-az-Cyrl-AZ.js b/build/development/date-az-Cyrl-AZ.js index 36af4fd9..c70e9e9d 100644 --- a/build/development/date-az-Cyrl-AZ.js +++ b/build/development/date-az-Cyrl-AZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "az-Cyrl-AZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "az-Cyrl-AZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "az-Cyrl-AZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "az-Cyrl-AZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-az-Latn-AZ.js b/build/development/date-az-Latn-AZ.js index a482ff2b..87b293b8 100644 --- a/build/development/date-az-Latn-AZ.js +++ b/build/development/date-az-Latn-AZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "az-Latn-AZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "az-Latn-AZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "az-Latn-AZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "az-Latn-AZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-be-BY.js b/build/development/date-be-BY.js index 7e495fcd..eedf28d5 100644 --- a/build/development/date-be-BY.js +++ b/build/development/date-be-BY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "be-BY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "be-BY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "be-BY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "be-BY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-bg-BG.js b/build/development/date-bg-BG.js index 32893bfb..22423063 100644 --- a/build/development/date-bg-BG.js +++ b/build/development/date-bg-BG.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "bg-BG"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "bg-BG"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "bg-BG"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "bg-BG"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-bs-Latn-BA.js b/build/development/date-bs-Latn-BA.js index 0e2d66d9..0cfa6c49 100644 --- a/build/development/date-bs-Latn-BA.js +++ b/build/development/date-bs-Latn-BA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "bs-Latn-BA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "bs-Latn-BA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "bs-Latn-BA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "bs-Latn-BA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ca-ES.js b/build/development/date-ca-ES.js index 0a9e2977..16b5be36 100644 --- a/build/development/date-ca-ES.js +++ b/build/development/date-ca-ES.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ca-ES"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ca-ES"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ca-ES"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ca-ES"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-cs-CZ.js b/build/development/date-cs-CZ.js index 4505505e..8e23334a 100644 --- a/build/development/date-cs-CZ.js +++ b/build/development/date-cs-CZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "cs-CZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "cs-CZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "cs-CZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "cs-CZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-cy-GB.js b/build/development/date-cy-GB.js index 53ee7b98..512011b1 100644 --- a/build/development/date-cy-GB.js +++ b/build/development/date-cy-GB.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "cy-GB"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "cy-GB"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "cy-GB"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "cy-GB"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-da-DK.js b/build/development/date-da-DK.js index 13484af4..74e72ce5 100644 --- a/build/development/date-da-DK.js +++ b/build/development/date-da-DK.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "da-DK"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "da-DK"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "da-DK"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "da-DK"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-de-AT.js b/build/development/date-de-AT.js index f9385ff0..6ff72dda 100644 --- a/build/development/date-de-AT.js +++ b/build/development/date-de-AT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "de-AT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "de-AT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "de-AT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "de-AT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-de-CH.js b/build/development/date-de-CH.js index c350253e..0a859e3d 100644 --- a/build/development/date-de-CH.js +++ b/build/development/date-de-CH.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "de-CH"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "de-CH"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "de-CH"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "de-CH"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-de-DE.js b/build/development/date-de-DE.js index 8ca27337..b085fe3d 100644 --- a/build/development/date-de-DE.js +++ b/build/development/date-de-DE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "de-DE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "de-DE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "de-DE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "de-DE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-de-LI.js b/build/development/date-de-LI.js index fe499070..6331d513 100644 --- a/build/development/date-de-LI.js +++ b/build/development/date-de-LI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "de-LI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "de-LI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "de-LI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "de-LI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-de-LU.js b/build/development/date-de-LU.js index f34e59ca..124680f0 100644 --- a/build/development/date-de-LU.js +++ b/build/development/date-de-LU.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "de-LU"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "de-LU"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "de-LU"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "de-LU"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-dv-MV.js b/build/development/date-dv-MV.js index fa5c6b33..ff822ff0 100644 --- a/build/development/date-dv-MV.js +++ b/build/development/date-dv-MV.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "dv-MV"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "dv-MV"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "dv-MV"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "dv-MV"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-el-GR.js b/build/development/date-el-GR.js index ba576b8f..ee809f87 100644 --- a/build/development/date-el-GR.js +++ b/build/development/date-el-GR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "el-GR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "el-GR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "el-GR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "el-GR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-029.js b/build/development/date-en-029.js index a054eb15..bf954a39 100644 --- a/build/development/date-en-029.js +++ b/build/development/date-en-029.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-029"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-029"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-029"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-029"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-AU.js b/build/development/date-en-AU.js index 72ddb506..3142a924 100644 --- a/build/development/date-en-AU.js +++ b/build/development/date-en-AU.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-AU"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-AU"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-AU"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-AU"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-BZ.js b/build/development/date-en-BZ.js index 950143f1..67452609 100644 --- a/build/development/date-en-BZ.js +++ b/build/development/date-en-BZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-BZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-BZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-BZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-BZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-CA.js b/build/development/date-en-CA.js index 968c4e8e..c1312f79 100644 --- a/build/development/date-en-CA.js +++ b/build/development/date-en-CA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-CA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-CA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-CA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-CA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-GB.js b/build/development/date-en-GB.js index ae4b3f22..fa66e4cf 100644 --- a/build/development/date-en-GB.js +++ b/build/development/date-en-GB.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-GB"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-GB"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-GB"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-GB"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-IE.js b/build/development/date-en-IE.js index 58433b95..bd2f305a 100644 --- a/build/development/date-en-IE.js +++ b/build/development/date-en-IE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-IE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-IE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-IE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-IE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-JM.js b/build/development/date-en-JM.js index 5d7f2543..bfe90877 100644 --- a/build/development/date-en-JM.js +++ b/build/development/date-en-JM.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-JM"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-JM"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-JM"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-JM"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-NZ.js b/build/development/date-en-NZ.js index d6f66486..8e275489 100644 --- a/build/development/date-en-NZ.js +++ b/build/development/date-en-NZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-NZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-NZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-NZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-NZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-PH.js b/build/development/date-en-PH.js index 246cc326..075af82e 100644 --- a/build/development/date-en-PH.js +++ b/build/development/date-en-PH.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-PH"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-PH"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-PH"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-PH"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-TT.js b/build/development/date-en-TT.js index 16d615f1..c4c3af02 100644 --- a/build/development/date-en-TT.js +++ b/build/development/date-en-TT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-TT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-TT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-TT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-TT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-US.js b/build/development/date-en-US.js index 31c98a7e..7f919f70 100644 --- a/build/development/date-en-US.js +++ b/build/development/date-en-US.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-US"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-US"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-US"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-US"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-ZA.js b/build/development/date-en-ZA.js index a9329a2c..1ff80c92 100644 --- a/build/development/date-en-ZA.js +++ b/build/development/date-en-ZA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-ZA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-ZA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-ZA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-ZA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-en-ZW.js b/build/development/date-en-ZW.js index f2274022..00eeecad 100644 --- a/build/development/date-en-ZW.js +++ b/build/development/date-en-ZW.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "en-ZW"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "en-ZW"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "en-ZW"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "en-ZW"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-AR.js b/build/development/date-es-AR.js index c3c2b4b2..aa936978 100644 --- a/build/development/date-es-AR.js +++ b/build/development/date-es-AR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-AR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-AR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-AR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-AR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-BO.js b/build/development/date-es-BO.js index 3440fcbd..32a215bb 100644 --- a/build/development/date-es-BO.js +++ b/build/development/date-es-BO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-BO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-BO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-BO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-BO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-CL.js b/build/development/date-es-CL.js index f7a06414..8756d620 100644 --- a/build/development/date-es-CL.js +++ b/build/development/date-es-CL.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-CL"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-CL"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-CL"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-CL"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-CO.js b/build/development/date-es-CO.js index 5a58559e..e5f45474 100644 --- a/build/development/date-es-CO.js +++ b/build/development/date-es-CO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-CO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-CO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-CO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-CO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-CR.js b/build/development/date-es-CR.js index d1ca449e..04d04401 100644 --- a/build/development/date-es-CR.js +++ b/build/development/date-es-CR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-CR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-CR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-CR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-CR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-DO.js b/build/development/date-es-DO.js index 23c0a218..f35d09a6 100644 --- a/build/development/date-es-DO.js +++ b/build/development/date-es-DO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-DO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-DO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-DO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-DO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-EC.js b/build/development/date-es-EC.js index f7458755..b18b460c 100644 --- a/build/development/date-es-EC.js +++ b/build/development/date-es-EC.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-EC"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-EC"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-EC"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-EC"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-ES.js b/build/development/date-es-ES.js index 461d4ad2..50c780b7 100644 --- a/build/development/date-es-ES.js +++ b/build/development/date-es-ES.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-ES"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-ES"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-ES"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-ES"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-GT.js b/build/development/date-es-GT.js index 775bd088..d76ae5b6 100644 --- a/build/development/date-es-GT.js +++ b/build/development/date-es-GT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-GT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-GT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-GT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-GT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-HN.js b/build/development/date-es-HN.js index 52bed958..c86864a1 100644 --- a/build/development/date-es-HN.js +++ b/build/development/date-es-HN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-HN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-HN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-HN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-HN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-MX.js b/build/development/date-es-MX.js index 27b7b1f8..ef53ff70 100644 --- a/build/development/date-es-MX.js +++ b/build/development/date-es-MX.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-MX"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-MX"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-MX"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-MX"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-NI.js b/build/development/date-es-NI.js index ba1ab702..9ee4d53c 100644 --- a/build/development/date-es-NI.js +++ b/build/development/date-es-NI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-NI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-NI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-NI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-NI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-PA.js b/build/development/date-es-PA.js index 90400524..f8c1740d 100644 --- a/build/development/date-es-PA.js +++ b/build/development/date-es-PA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-PA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-PA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-PA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-PA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-PE.js b/build/development/date-es-PE.js index 3f58d50d..7aa1d98f 100644 --- a/build/development/date-es-PE.js +++ b/build/development/date-es-PE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-PE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-PE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-PE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-PE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-PR.js b/build/development/date-es-PR.js index d50cf898..8c711dab 100644 --- a/build/development/date-es-PR.js +++ b/build/development/date-es-PR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-PR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-PR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-PR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-PR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-PY.js b/build/development/date-es-PY.js index 1d7143af..2eefb8cc 100644 --- a/build/development/date-es-PY.js +++ b/build/development/date-es-PY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-PY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-PY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-PY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-PY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-SV.js b/build/development/date-es-SV.js index 8eb7c935..316a5d88 100644 --- a/build/development/date-es-SV.js +++ b/build/development/date-es-SV.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-SV"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-SV"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-SV"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-SV"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-UY.js b/build/development/date-es-UY.js index 4c4df837..98a8fbb0 100644 --- a/build/development/date-es-UY.js +++ b/build/development/date-es-UY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-UY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-UY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-UY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-UY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-es-VE.js b/build/development/date-es-VE.js index 2a329fd9..708687ba 100644 --- a/build/development/date-es-VE.js +++ b/build/development/date-es-VE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "es-VE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "es-VE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "es-VE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "es-VE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-et-EE.js b/build/development/date-et-EE.js index aaa1d677..8364d2c1 100644 --- a/build/development/date-et-EE.js +++ b/build/development/date-et-EE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "et-EE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "et-EE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "et-EE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "et-EE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-eu-ES.js b/build/development/date-eu-ES.js index 1b48e3b5..85760344 100644 --- a/build/development/date-eu-ES.js +++ b/build/development/date-eu-ES.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "eu-ES"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "eu-ES"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "eu-ES"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "eu-ES"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fa-IR.js b/build/development/date-fa-IR.js index 393d1a60..881ba656 100644 --- a/build/development/date-fa-IR.js +++ b/build/development/date-fa-IR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fa-IR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fa-IR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fa-IR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fa-IR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fi-FI.js b/build/development/date-fi-FI.js index bfc0dafe..56f98f2b 100644 --- a/build/development/date-fi-FI.js +++ b/build/development/date-fi-FI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fi-FI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fi-FI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fi-FI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fi-FI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fo-FO.js b/build/development/date-fo-FO.js index db40713b..253d3156 100644 --- a/build/development/date-fo-FO.js +++ b/build/development/date-fo-FO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fo-FO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fo-FO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fo-FO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fo-FO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fr-BE.js b/build/development/date-fr-BE.js index 848cdd98..e9be9eca 100644 --- a/build/development/date-fr-BE.js +++ b/build/development/date-fr-BE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fr-BE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fr-BE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fr-BE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fr-BE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fr-CA.js b/build/development/date-fr-CA.js index 03b0059f..34375581 100644 --- a/build/development/date-fr-CA.js +++ b/build/development/date-fr-CA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fr-CA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fr-CA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fr-CA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fr-CA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fr-CH.js b/build/development/date-fr-CH.js index 5cc763de..30a53641 100644 --- a/build/development/date-fr-CH.js +++ b/build/development/date-fr-CH.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fr-CH"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fr-CH"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fr-CH"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fr-CH"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fr-FR.js b/build/development/date-fr-FR.js index a5ed8a54..6100ce12 100644 --- a/build/development/date-fr-FR.js +++ b/build/development/date-fr-FR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fr-FR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fr-FR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fr-FR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fr-FR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fr-LU.js b/build/development/date-fr-LU.js index dc2fd5a5..29afd635 100644 --- a/build/development/date-fr-LU.js +++ b/build/development/date-fr-LU.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fr-LU"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fr-LU"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fr-LU"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fr-LU"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-fr-MC.js b/build/development/date-fr-MC.js index b675baef..5c680e76 100644 --- a/build/development/date-fr-MC.js +++ b/build/development/date-fr-MC.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "fr-MC"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "fr-MC"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "fr-MC"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "fr-MC"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-gl-ES.js b/build/development/date-gl-ES.js index 7d40180a..c8d21a15 100644 --- a/build/development/date-gl-ES.js +++ b/build/development/date-gl-ES.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "gl-ES"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "gl-ES"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "gl-ES"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "gl-ES"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-gu-IN.js b/build/development/date-gu-IN.js index 812efe53..7d05ee18 100644 --- a/build/development/date-gu-IN.js +++ b/build/development/date-gu-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "gu-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "gu-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "gu-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "gu-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-he-IL.js b/build/development/date-he-IL.js index 48e6175b..26d79674 100644 --- a/build/development/date-he-IL.js +++ b/build/development/date-he-IL.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "he-IL"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "he-IL"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "he-IL"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "he-IL"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-hi-IN.js b/build/development/date-hi-IN.js index 532b19e2..b2456b51 100644 --- a/build/development/date-hi-IN.js +++ b/build/development/date-hi-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "hi-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "hi-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "hi-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "hi-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-hr-BA.js b/build/development/date-hr-BA.js index a6c28bff..d7818aa6 100644 --- a/build/development/date-hr-BA.js +++ b/build/development/date-hr-BA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "hr-BA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "hr-BA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "hr-BA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "hr-BA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-hr-HR.js b/build/development/date-hr-HR.js index e0670099..2c432673 100644 --- a/build/development/date-hr-HR.js +++ b/build/development/date-hr-HR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "hr-HR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "hr-HR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "hr-HR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "hr-HR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-hu-HU.js b/build/development/date-hu-HU.js index ff8ed70b..a69e9881 100644 --- a/build/development/date-hu-HU.js +++ b/build/development/date-hu-HU.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "hu-HU"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "hu-HU"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "hu-HU"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "hu-HU"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-hy-AM.js b/build/development/date-hy-AM.js index 62a059d4..abdecd42 100644 --- a/build/development/date-hy-AM.js +++ b/build/development/date-hy-AM.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "hy-AM"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "hy-AM"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "hy-AM"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "hy-AM"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-id-ID.js b/build/development/date-id-ID.js index 35e570db..c9e42e10 100644 --- a/build/development/date-id-ID.js +++ b/build/development/date-id-ID.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "id-ID"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "id-ID"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "id-ID"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "id-ID"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-is-IS.js b/build/development/date-is-IS.js index a42fea9d..61f0e69e 100644 --- a/build/development/date-is-IS.js +++ b/build/development/date-is-IS.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "is-IS"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "is-IS"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "is-IS"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "is-IS"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-it-CH.js b/build/development/date-it-CH.js index 68ec3bc2..b1aa8595 100644 --- a/build/development/date-it-CH.js +++ b/build/development/date-it-CH.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "it-CH"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "it-CH"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "it-CH"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "it-CH"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-it-IT.js b/build/development/date-it-IT.js index d9382a5c..96ed66d1 100644 --- a/build/development/date-it-IT.js +++ b/build/development/date-it-IT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "it-IT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "it-IT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "it-IT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "it-IT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ja-JP.js b/build/development/date-ja-JP.js index daee5a07..a1e62d20 100644 --- a/build/development/date-ja-JP.js +++ b/build/development/date-ja-JP.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ja-JP"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ja-JP"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ja-JP"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ja-JP"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ka-GE.js b/build/development/date-ka-GE.js index 2b21e9b1..eff75153 100644 --- a/build/development/date-ka-GE.js +++ b/build/development/date-ka-GE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ka-GE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ka-GE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ka-GE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ka-GE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-kk-KZ.js b/build/development/date-kk-KZ.js index d9ff805f..3674288a 100644 --- a/build/development/date-kk-KZ.js +++ b/build/development/date-kk-KZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "kk-KZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "kk-KZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "kk-KZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "kk-KZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-kn-IN.js b/build/development/date-kn-IN.js index 81168711..1dae1a04 100644 --- a/build/development/date-kn-IN.js +++ b/build/development/date-kn-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "kn-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "kn-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "kn-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "kn-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ko-KR.js b/build/development/date-ko-KR.js index efce5b85..22145bba 100644 --- a/build/development/date-ko-KR.js +++ b/build/development/date-ko-KR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ko-KR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ko-KR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ko-KR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ko-KR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-kok-IN.js b/build/development/date-kok-IN.js index 1791e85f..d0ad13da 100644 --- a/build/development/date-kok-IN.js +++ b/build/development/date-kok-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "kok-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "kok-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "kok-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "kok-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ky-KG.js b/build/development/date-ky-KG.js index e9e0f422..b0196b18 100644 --- a/build/development/date-ky-KG.js +++ b/build/development/date-ky-KG.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ky-KG"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ky-KG"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ky-KG"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ky-KG"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-lt-LT.js b/build/development/date-lt-LT.js index cb8dbe1c..3d6d995e 100644 --- a/build/development/date-lt-LT.js +++ b/build/development/date-lt-LT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "lt-LT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "lt-LT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "lt-LT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "lt-LT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-lv-LV.js b/build/development/date-lv-LV.js index fcf3e93d..daebeb5f 100644 --- a/build/development/date-lv-LV.js +++ b/build/development/date-lv-LV.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "lv-LV"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "lv-LV"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "lv-LV"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "lv-LV"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-mi-NZ.js b/build/development/date-mi-NZ.js index 8033bbda..53939968 100644 --- a/build/development/date-mi-NZ.js +++ b/build/development/date-mi-NZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "mi-NZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "mi-NZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "mi-NZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "mi-NZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-mk-MK.js b/build/development/date-mk-MK.js index 8f7ece03..a121c266 100644 --- a/build/development/date-mk-MK.js +++ b/build/development/date-mk-MK.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "mk-MK"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "mk-MK"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "mk-MK"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "mk-MK"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-mn-MN.js b/build/development/date-mn-MN.js index b690c2c1..735d79e8 100644 --- a/build/development/date-mn-MN.js +++ b/build/development/date-mn-MN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "mn-MN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "mn-MN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "mn-MN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "mn-MN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-mr-IN.js b/build/development/date-mr-IN.js index 7ce8e859..beb02974 100644 --- a/build/development/date-mr-IN.js +++ b/build/development/date-mr-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "mr-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "mr-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "mr-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "mr-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ms-BN.js b/build/development/date-ms-BN.js index 021d7afb..ade693be 100644 --- a/build/development/date-ms-BN.js +++ b/build/development/date-ms-BN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ms-BN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ms-BN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ms-BN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ms-BN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ms-MY.js b/build/development/date-ms-MY.js index 1147d408..d21a1f08 100644 --- a/build/development/date-ms-MY.js +++ b/build/development/date-ms-MY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ms-MY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ms-MY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ms-MY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ms-MY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-mt-MT.js b/build/development/date-mt-MT.js index 351b48fd..2e3f1461 100644 --- a/build/development/date-mt-MT.js +++ b/build/development/date-mt-MT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "mt-MT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "mt-MT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "mt-MT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "mt-MT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-nb-NO.js b/build/development/date-nb-NO.js index 6a412d0e..ca885ffb 100644 --- a/build/development/date-nb-NO.js +++ b/build/development/date-nb-NO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "nb-NO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "nb-NO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "nb-NO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "nb-NO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-nl-BE.js b/build/development/date-nl-BE.js index 3f8bea61..43435618 100644 --- a/build/development/date-nl-BE.js +++ b/build/development/date-nl-BE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "nl-BE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "nl-BE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "nl-BE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "nl-BE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-nl-NL.js b/build/development/date-nl-NL.js index 06aadf4c..7f2c4710 100644 --- a/build/development/date-nl-NL.js +++ b/build/development/date-nl-NL.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "nl-NL"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "nl-NL"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "nl-NL"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "nl-NL"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-nn-NO.js b/build/development/date-nn-NO.js index 535f889b..78ee5ec9 100644 --- a/build/development/date-nn-NO.js +++ b/build/development/date-nn-NO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "nn-NO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "nn-NO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "nn-NO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "nn-NO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ns-ZA.js b/build/development/date-ns-ZA.js index 68094070..50e40c49 100644 --- a/build/development/date-ns-ZA.js +++ b/build/development/date-ns-ZA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ns-ZA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ns-ZA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ns-ZA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ns-ZA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-pa-IN.js b/build/development/date-pa-IN.js index 468a6daa..23376a5f 100644 --- a/build/development/date-pa-IN.js +++ b/build/development/date-pa-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "pa-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "pa-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "pa-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "pa-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-pl-PL.js b/build/development/date-pl-PL.js index ca3db289..ab3641d0 100644 --- a/build/development/date-pl-PL.js +++ b/build/development/date-pl-PL.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "pl-PL"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "pl-PL"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "pl-PL"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "pl-PL"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-pt-BR.js b/build/development/date-pt-BR.js index c035381e..482f1645 100644 --- a/build/development/date-pt-BR.js +++ b/build/development/date-pt-BR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "pt-BR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "pt-BR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "pt-BR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "pt-BR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-pt-PT.js b/build/development/date-pt-PT.js index bce74faf..b29a77b0 100644 --- a/build/development/date-pt-PT.js +++ b/build/development/date-pt-PT.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "pt-PT"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "pt-PT"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "pt-PT"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "pt-PT"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-quz-BO.js b/build/development/date-quz-BO.js index 8e989bd7..ed4e7b97 100644 --- a/build/development/date-quz-BO.js +++ b/build/development/date-quz-BO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "quz-BO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "quz-BO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "quz-BO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "quz-BO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-quz-EC.js b/build/development/date-quz-EC.js index 4112aea9..9b88a4b1 100644 --- a/build/development/date-quz-EC.js +++ b/build/development/date-quz-EC.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "quz-EC"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "quz-EC"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "quz-EC"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "quz-EC"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-quz-PE.js b/build/development/date-quz-PE.js index bbd164c4..b5280378 100644 --- a/build/development/date-quz-PE.js +++ b/build/development/date-quz-PE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "quz-PE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "quz-PE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "quz-PE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "quz-PE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ro-RO.js b/build/development/date-ro-RO.js index e8bb8cda..e07bc8b4 100644 --- a/build/development/date-ro-RO.js +++ b/build/development/date-ro-RO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ro-RO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ro-RO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ro-RO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ro-RO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ru-RU.js b/build/development/date-ru-RU.js index 279615c0..3a8cad4c 100644 --- a/build/development/date-ru-RU.js +++ b/build/development/date-ru-RU.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ru-RU"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ru-RU"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ru-RU"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ru-RU"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sa-IN.js b/build/development/date-sa-IN.js index 8938a5b7..6d7732f4 100644 --- a/build/development/date-sa-IN.js +++ b/build/development/date-sa-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sa-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sa-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sa-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sa-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-se-FI.js b/build/development/date-se-FI.js index 9b438992..d8f02eeb 100644 --- a/build/development/date-se-FI.js +++ b/build/development/date-se-FI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "se-FI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "se-FI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "se-FI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "se-FI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-se-NO.js b/build/development/date-se-NO.js index 4750a4fd..f2ebf206 100644 --- a/build/development/date-se-NO.js +++ b/build/development/date-se-NO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "se-NO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "se-NO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "se-NO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "se-NO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-se-SE.js b/build/development/date-se-SE.js index fc560eb7..47bbc669 100644 --- a/build/development/date-se-SE.js +++ b/build/development/date-se-SE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "se-SE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "se-SE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "se-SE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "se-SE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sk-SK.js b/build/development/date-sk-SK.js index 57e28f9d..e1370f6e 100644 --- a/build/development/date-sk-SK.js +++ b/build/development/date-sk-SK.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sk-SK"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sk-SK"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sk-SK"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sk-SK"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sl-SI.js b/build/development/date-sl-SI.js index 2e021ed4..fcf8d920 100644 --- a/build/development/date-sl-SI.js +++ b/build/development/date-sl-SI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sl-SI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sl-SI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sl-SI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sl-SI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sma-NO.js b/build/development/date-sma-NO.js index 3e32495f..973c62c8 100644 --- a/build/development/date-sma-NO.js +++ b/build/development/date-sma-NO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sma-NO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sma-NO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sma-NO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sma-NO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sma-SE.js b/build/development/date-sma-SE.js index 0935e30f..25d94918 100644 --- a/build/development/date-sma-SE.js +++ b/build/development/date-sma-SE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sma-SE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sma-SE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sma-SE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sma-SE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-smj-NO.js b/build/development/date-smj-NO.js index d9804323..bbbff310 100644 --- a/build/development/date-smj-NO.js +++ b/build/development/date-smj-NO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "smj-NO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "smj-NO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "smj-NO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "smj-NO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-smj-SE.js b/build/development/date-smj-SE.js index a9b33f5e..f80ec508 100644 --- a/build/development/date-smj-SE.js +++ b/build/development/date-smj-SE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "smj-SE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "smj-SE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "smj-SE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "smj-SE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-smn-FI.js b/build/development/date-smn-FI.js index 5f3ab844..1708b74a 100644 --- a/build/development/date-smn-FI.js +++ b/build/development/date-smn-FI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "smn-FI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "smn-FI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "smn-FI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "smn-FI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sms-FI.js b/build/development/date-sms-FI.js index 30673c22..53551ef7 100644 --- a/build/development/date-sms-FI.js +++ b/build/development/date-sms-FI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sms-FI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sms-FI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sms-FI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sms-FI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sq-AL.js b/build/development/date-sq-AL.js index fc7f979e..addaa2e8 100644 --- a/build/development/date-sq-AL.js +++ b/build/development/date-sq-AL.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sq-AL"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sq-AL"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sq-AL"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sq-AL"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sr-Cyrl-BA.js b/build/development/date-sr-Cyrl-BA.js index deb9750f..8c7014d4 100644 --- a/build/development/date-sr-Cyrl-BA.js +++ b/build/development/date-sr-Cyrl-BA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sr-Cyrl-BA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sr-Cyrl-BA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sr-Cyrl-BA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sr-Cyrl-BA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sr-Cyrl-CS.js b/build/development/date-sr-Cyrl-CS.js index 2239d82c..ae241aed 100644 --- a/build/development/date-sr-Cyrl-CS.js +++ b/build/development/date-sr-Cyrl-CS.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sr-Cyrl-CS"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sr-Cyrl-CS"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sr-Cyrl-CS"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sr-Cyrl-CS"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sr-Latn-BA.js b/build/development/date-sr-Latn-BA.js index f52d0b31..7806dc93 100644 --- a/build/development/date-sr-Latn-BA.js +++ b/build/development/date-sr-Latn-BA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sr-Latn-BA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sr-Latn-BA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sr-Latn-BA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sr-Latn-BA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sr-Latn-CS.js b/build/development/date-sr-Latn-CS.js index df2e2b46..915dac56 100644 --- a/build/development/date-sr-Latn-CS.js +++ b/build/development/date-sr-Latn-CS.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sr-Latn-CS"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sr-Latn-CS"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sr-Latn-CS"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sr-Latn-CS"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sv-FI.js b/build/development/date-sv-FI.js index 106c1dd0..2727b8f0 100644 --- a/build/development/date-sv-FI.js +++ b/build/development/date-sv-FI.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sv-FI"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sv-FI"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sv-FI"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sv-FI"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sv-SE.js b/build/development/date-sv-SE.js index c524894b..47558a37 100644 --- a/build/development/date-sv-SE.js +++ b/build/development/date-sv-SE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sv-SE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sv-SE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sv-SE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sv-SE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-sw-KE.js b/build/development/date-sw-KE.js index 21da3f1f..fda23b2b 100644 --- a/build/development/date-sw-KE.js +++ b/build/development/date-sw-KE.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "sw-KE"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "sw-KE"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "sw-KE"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "sw-KE"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-syr-SY.js b/build/development/date-syr-SY.js index ef2cb040..c6f425c4 100644 --- a/build/development/date-syr-SY.js +++ b/build/development/date-syr-SY.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "syr-SY"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "syr-SY"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "syr-SY"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "syr-SY"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ta-IN.js b/build/development/date-ta-IN.js index 9a76828c..e08d2c36 100644 --- a/build/development/date-ta-IN.js +++ b/build/development/date-ta-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ta-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ta-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ta-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ta-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-te-IN.js b/build/development/date-te-IN.js index 36d0f51e..39499d25 100644 --- a/build/development/date-te-IN.js +++ b/build/development/date-te-IN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "te-IN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "te-IN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "te-IN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "te-IN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-th-TH.js b/build/development/date-th-TH.js index fddf8ee1..97d9ffd7 100644 --- a/build/development/date-th-TH.js +++ b/build/development/date-th-TH.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "th-TH"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "th-TH"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "th-TH"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "th-TH"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-tn-ZA.js b/build/development/date-tn-ZA.js index 4f905eae..08c616b4 100644 --- a/build/development/date-tn-ZA.js +++ b/build/development/date-tn-ZA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "tn-ZA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "tn-ZA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "tn-ZA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "tn-ZA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-tr-TR.js b/build/development/date-tr-TR.js index c89c0887..306c857f 100644 --- a/build/development/date-tr-TR.js +++ b/build/development/date-tr-TR.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "tr-TR"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "tr-TR"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "tr-TR"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "tr-TR"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-tt-RU.js b/build/development/date-tt-RU.js index dcc9d1da..78981655 100644 --- a/build/development/date-tt-RU.js +++ b/build/development/date-tt-RU.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "tt-RU"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "tt-RU"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "tt-RU"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "tt-RU"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-uk-UA.js b/build/development/date-uk-UA.js index 72885aea..02e3f9f6 100644 --- a/build/development/date-uk-UA.js +++ b/build/development/date-uk-UA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "uk-UA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "uk-UA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "uk-UA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "uk-UA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-ur-PK.js b/build/development/date-ur-PK.js index a7c63bc6..b273549c 100644 --- a/build/development/date-ur-PK.js +++ b/build/development/date-ur-PK.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "ur-PK"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "ur-PK"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "ur-PK"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "ur-PK"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-uz-Cyrl-UZ.js b/build/development/date-uz-Cyrl-UZ.js index b93683f9..3fac9d44 100644 --- a/build/development/date-uz-Cyrl-UZ.js +++ b/build/development/date-uz-Cyrl-UZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "uz-Cyrl-UZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "uz-Cyrl-UZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "uz-Cyrl-UZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "uz-Cyrl-UZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-uz-Latn-UZ.js b/build/development/date-uz-Latn-UZ.js index 5ee8846b..136c24bd 100644 --- a/build/development/date-uz-Latn-UZ.js +++ b/build/development/date-uz-Latn-UZ.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "uz-Latn-UZ"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "uz-Latn-UZ"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "uz-Latn-UZ"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "uz-Latn-UZ"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-vi-VN.js b/build/development/date-vi-VN.js index 5d629478..3b842cda 100644 --- a/build/development/date-vi-VN.js +++ b/build/development/date-vi-VN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "vi-VN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "vi-VN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "vi-VN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "vi-VN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-xh-ZA.js b/build/development/date-xh-ZA.js index 678179c9..32fce9f8 100644 --- a/build/development/date-xh-ZA.js +++ b/build/development/date-xh-ZA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "xh-ZA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "xh-ZA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "xh-ZA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "xh-ZA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-zh-CN.js b/build/development/date-zh-CN.js index a8bc8679..862facc1 100644 --- a/build/development/date-zh-CN.js +++ b/build/development/date-zh-CN.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "zh-CN"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "zh-CN"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "zh-CN"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "zh-CN"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-zh-HK.js b/build/development/date-zh-HK.js index 0008edf1..4f2f583e 100644 --- a/build/development/date-zh-HK.js +++ b/build/development/date-zh-HK.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "zh-HK"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "zh-HK"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "zh-HK"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "zh-HK"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-zh-MO.js b/build/development/date-zh-MO.js index 4b9a86c5..682f73de 100644 --- a/build/development/date-zh-MO.js +++ b/build/development/date-zh-MO.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "zh-MO"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "zh-MO"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "zh-MO"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "zh-MO"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-zh-SG.js b/build/development/date-zh-SG.js index 36d66391..975b733a 100644 --- a/build/development/date-zh-SG.js +++ b/build/development/date-zh-SG.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "zh-SG"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "zh-SG"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "zh-SG"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "zh-SG"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-zh-TW.js b/build/development/date-zh-TW.js index ff0b7237..1f4482e6 100644 --- a/build/development/date-zh-TW.js +++ b/build/development/date-zh-TW.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "zh-TW"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "zh-TW"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "zh-TW"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "zh-TW"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date-zu-ZA.js b/build/development/date-zu-ZA.js index c20751aa..6d9420dd 100644 --- a/build/development/date-zu-ZA.js +++ b/build/development/date-zu-ZA.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -187,7 +187,7 @@ Date.CultureStrings.lang = "zu-ZA"; /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -1075,7 +1075,14 @@ Date.CultureStrings.lang = "zu-ZA"; } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2477,7 +2484,7 @@ Date.CultureStrings.lang = "zu-ZA"; } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2605,7 +2612,7 @@ Date.CultureStrings.lang = "zu-ZA"; if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/development/date.js b/build/development/date.js index ec79b6d2..849a9f30 100644 --- a/build/development/date.js +++ b/build/development/date.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-02-13 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -888,7 +888,14 @@ } var x = config; - + + if (x.day) { + // If we should be a different date than today (eg: for 'tomorrow -1d', etc). + // Should only effect parsing, not direct usage (eg, Finish and FinishExact) + if ((x.day - this.getDate()) !== 0) { + this.setDate(x.day); + } + } if (x.milliseconds) { this.addMilliseconds(x.milliseconds); } @@ -2290,7 +2297,7 @@ } var today = $D.today(); - + if (this.now && !this.unit && !this.operator) { return new Date(); } else if (this.now) { @@ -2418,7 +2425,7 @@ if (expression && this.timezone && this.day && this.days) { this.day = this.days; } - + return (expression) ? today.add(this) : today.set(this); } }; diff --git a/build/production/date-ar-EG.min.js b/build/production/date-ar-EG.min.js index efc9a361..a4e6e1df 100644 --- a/build/production/date-ar-EG.min.js +++ b/build/production/date-ar-EG.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -15,68 +15,71 @@ @homepage https://github.com/abritinthebay/datejs */ Date.CultureStrings=Date.CultureStrings||{}; -Date.CultureStrings["af-ZA"]={name:"af-ZA",englishName:"Afrikaans (South Africa)",nativeName:"Afrikaans (Suid Afrika)",Sunday:"Sondag",Monday:"Maandag",Tuesday:"Dinsdag",Wednesday:"Woensdag",Thursday:"Donderdag",Friday:"Vrydag",Saturday:"Saterdag",Sun:"Son",Mon:"Maan",Tue:"Dins",Wed:"Woen",Thu:"Dond",Fri:"Vry",Sat:"Sat",Su:"So",Mo:"Ma",Tu:"Di",We:"Wo",Th:"Do",Fr:"Vr",Sa:"Sa",S_Sun_Initial:"S",M_Mon_Initial:"M",T_Tue_Initial:"D",W_Wed_Initial:"W",T_Thu_Initial:"D",F_Fri_Initial:"V",S_Sat_Initial:"S", -January:"Januarie",February:"Februarie",March:"Maart",April:"April",May:"Mei",June:"Junie",July:"Julie",August:"Augustus",September:"September",October:"Oktober",November:"November",December:"Desember",Jan_Abbr:"Jan",Feb_Abbr:"Feb",Mar_Abbr:"Mar",Apr_Abbr:"Apr",May_Abbr:"Mei",Jun_Abbr:"Jun",Jul_Abbr:"Jul",Aug_Abbr:"Aug",Sep_Abbr:"Sep",Oct_Abbr:"Okt",Nov_Abbr:"Nov",Dec_Abbr:"Des",AM:"",PM:"nm",firstDayOfWeek:0,twoDigitYearMax:2029,mdy:"ymd","M/d/yyyy":"yyyy/MM/dd","dddd, MMMM dd, yyyy":"dd MMMM yyyy", -"h:mm tt":"hh:mm tt","h:mm:ss tt":"hh:mm:ss tt","dddd, MMMM dd, yyyy h:mm:ss tt":"dd MMMM yyyy hh:mm:ss tt","yyyy-MM-ddTHH:mm:ss":"yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ssZ":"yyyy-MM-dd HH:mm:ssZ","ddd, dd MMM yyyy HH:mm:ss":"ddd, dd MMM yyyy HH:mm:ss","MMMM dd":"dd MMMM","MMMM, yyyy":"MMMM yyyy","/jan(uary)?/":"jan(uarie)?","/feb(ruary)?/":"feb(ruarie)?","/mar(ch)?/":"maart","/apr(il)?/":"apr(il)?","/may/":"mei","/jun(e)?/":"jun(ie)?","/jul(y)?/":"jul(ie)?","/aug(ust)?/":"aug(ustus)?","/sep(t(ember)?)?/":"sep(t(ember)?)?", -"/oct(ober)?/":"okt(ober)?","/nov(ember)?/":"nov(ember)?","/dec(ember)?/":"des(ember)?","/^su(n(day)?)?/":"^so(n(dag)?)?","/^mo(n(day)?)?/":"^ma(an(dag)?)?","/^tu(e(s(day)?)?)?/":"^di(ns(dag)?)?","/^we(d(nesday)?)?/":"^wo(en(sdag)?)?","/^th(u(r(s(day)?)?)?)?/":"^do(nd(erdag)?)?","/^fr(i(day)?)?/":"^vr(y(dag)?)?","/^sa(t(urday)?)?/":"^sa(t(erdag)?)?","/^next/":"^next","/^last|past|prev(ious)?/":"^last|past|prev(ious)?","/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)", +Date.CultureStrings["ar-DZ"]={name:"ar-DZ",englishName:"Arabic (Algeria)",nativeName:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u062c\u0632\u0627\u0626\u0631)",Sunday:"\u0627\u0644\u0627\u062d\u062f",Monday:"\u0627\u0644\u0627\u062b\u0646\u064a\u0646",Tuesday:"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",Wednesday:"\u0627\u0644\u0627\u0631\u0628\u0639\u0627\u0621",Thursday:"\u0627\u0644\u062e\u0645\u064a\u0633",Friday:"\u0627\u0644\u062c\u0645\u0639\u0629",Saturday:"\u0627\u0644\u0633\u0628\u062a", +Sun:"\u0627\u0644\u0627\u062d\u062f",Mon:"\u0627\u0644\u0627\u062b\u0646\u064a\u0646",Tue:"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",Wed:"\u0627\u0644\u0627\u0631\u0628\u0639\u0627\u0621",Thu:"\u0627\u0644\u062e\u0645\u064a\u0633",Fri:"\u0627\u0644\u062c\u0645\u0639\u0629",Sat:"\u0627\u0644\u0633\u0628\u062a",Su:"\u0623",Mo:"\u0627",Tu:"\u062b",We:"\u0623",Th:"\u062e",Fr:"\u062c",Sa:"\u0633",S_Sun_Initial:"\u0623",M_Mon_Initial:"\u0627",T_Tue_Initial:"\u062b",W_Wed_Initial:"\u0623",T_Thu_Initial:"\u062e", +F_Fri_Initial:"\u062c",S_Sat_Initial:"\u0633",January:"\u062c\u0627\u0646\u0641\u064a\u064a\u0647",February:"\u0641\u064a\u0641\u0631\u064a\u064a\u0647",March:"\u0645\u0627\u0631\u0633",April:"\u0623\u0641\u0631\u064a\u0644",May:"\u0645\u064a",June:"\u062c\u0648\u0627\u0646",July:"\u062c\u0648\u064a\u064a\u0647",August:"\u0623\u0648\u062a",September:"\u0633\u0628\u062a\u0645\u0628\u0631",October:"\u0627\u0643\u062a\u0648\u0628\u0631",November:"\u0646\u0648\u0641\u0645\u0628\u0631",December:"\u062f\u064a\u0633\u0645\u0628\u0631", +Jan_Abbr:"\u062c\u0627\u0646\u0641\u064a\u064a\u0647",Feb_Abbr:"\u0641\u064a\u0641\u0631\u064a\u064a\u0647",Mar_Abbr:"\u0645\u0627\u0631\u0633",Apr_Abbr:"\u0623\u0641\u0631\u064a\u0644",May_Abbr:"\u0645\u064a",Jun_Abbr:"\u062c\u0648\u0627\u0646",Jul_Abbr:"\u062c\u0648\u064a\u064a\u0647",Aug_Abbr:"\u0623\u0648\u062a",Sep_Abbr:"\u0633\u0628\u062a\u0645\u0628\u0631",Oct_Abbr:"\u0627\u0643\u062a\u0648\u0628\u0631",Nov_Abbr:"\u0646\u0648\u0641\u0645\u0628\u0631",Dec_Abbr:"\u062f\u064a\u0633\u0645\u0628\u0631", +AM:"\u0635",PM:"\u0645",firstDayOfWeek:6,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd-MM-yyyy","dddd, MMMM dd, yyyy":"dd MMMM, yyyy","h:mm tt":"H:mm","h:mm:ss tt":"H:mm:ss","dddd, MMMM dd, yyyy h:mm:ss tt":"dd MMMM, yyyy H:mm:ss","yyyy-MM-ddTHH:mm:ss":"yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ssZ":"yyyy-MM-dd HH:mm:ssZ","ddd, dd MMM yyyy HH:mm:ss":"ddd, dd MMM yyyy HH:mm:ss","MMMM dd":"dd MMMM","MMMM, yyyy":"MMMM, yyyy","/jan(uary)?/":"\u062c\u0627\u0646\u0641\u064a\u064a\u0647","/feb(ruary)?/":"\u0641\u064a\u0641\u0631\u064a\u064a\u0647", +"/mar(ch)?/":"\u0645\u0627\u0631\u0633","/apr(il)?/":"\u0623\u0641\u0631\u064a\u0644","/may/":"\u0645\u064a","/jun(e)?/":"\u062c\u0648\u0627\u0646","/jul(y)?/":"\u062c\u0648\u064a\u064a\u0647","/aug(ust)?/":"\u0623\u0648\u062a","/sep(t(ember)?)?/":"\u0633\u0628\u062a\u0645\u0628\u0631","/oct(ober)?/":"\u0627\u0643\u062a\u0648\u0628\u0631","/nov(ember)?/":"\u0646\u0648\u0641\u0645\u0628\u0631","/dec(ember)?/":"\u062f\u064a\u0633\u0645\u0628\u0631","/^su(n(day)?)?/":"^\u0627\u0644\u0627\u062d\u062f", +"/^mo(n(day)?)?/":"^\u0627(1)?","/^tu(e(s(day)?)?)?/":"^\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621","/^we(d(nesday)?)?/":"^\u0627\u0644\u0627\u0631\u0628\u0639\u0627\u0621","/^th(u(r(s(day)?)?)?)?/":"^\u0627\u0644\u062e\u0645\u064a\u0633","/^fr(i(day)?)?/":"^\u0627\u0644\u062c\u0645\u0639\u0629","/^sa(t(urday)?)?/":"^\u0627\u0644\u0633\u0628\u062a","/^next/":"^next","/^last|past|prev(ious)?/":"^last|past|prev(ious)?","/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)", "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", -CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="af-ZA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-DZ"; +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-IQ.min.js b/build/production/date-ar-IQ.min.js index a4e69d53..c47f7876 100644 --- a/build/production/date-ar-IQ.min.js +++ b/build/production/date-ar-IQ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Nov_Abbr:"\u062a\u0634\u0631\u064a\u0646\u00a0\u0627\u0644\u062b\u0627\u0646\u06 "/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST", ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT", AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-IQ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-JO.min.js b/build/production/date-ar-JO.min.js index 80672e48..2a198014 100644 --- a/build/production/date-ar-JO.min.js +++ b/build/production/date-ar-JO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Nov_Abbr:"\u062a\u0634\u0631\u064a\u0646\u00a0\u0627\u0644\u062b\u0627\u0646\u06 "/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST", ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT", AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-JO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-KW.min.js b/build/production/date-ar-KW.min.js index 703e1f26..45de370d 100644 --- a/build/production/date-ar-KW.min.js +++ b/build/production/date-ar-KW.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ AM:"\u0635",PM:"\u0645",firstDayOfWeek:6,twoDigitYearMax:2029,mdy:"dmy","M/d/yyy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-KW"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-LB.min.js b/build/production/date-ar-LB.min.js index 0034addc..a338b66a 100644 --- a/build/production/date-ar-LB.min.js +++ b/build/production/date-ar-LB.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Nov_Abbr:"\u062a\u0634\u0631\u064a\u0646\u00a0\u0627\u0644\u062b\u0627\u0646\u06 "/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST", ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT", AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-LB"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-LY.min.js b/build/production/date-ar-LY.min.js index d3b64ed4..b647b751 100644 --- a/build/production/date-ar-LY.min.js +++ b/build/production/date-ar-LY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ AM:"\u0635",PM:"\u0645",firstDayOfWeek:6,twoDigitYearMax:2029,mdy:"dmy","M/d/yyy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-LY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-MA.min.js b/build/production/date-ar-MA.min.js index 49d0c96b..2d4984f1 100644 --- a/build/production/date-ar-MA.min.js +++ b/build/production/date-ar-MA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ AM:"\u0635",PM:"\u0645",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-MA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-OM.min.js b/build/production/date-ar-OM.min.js index 0fe20a3f..65b07ddf 100644 --- a/build/production/date-ar-OM.min.js +++ b/build/production/date-ar-OM.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ AM:"\u0635",PM:"\u0645",firstDayOfWeek:6,twoDigitYearMax:2029,mdy:"dmy","M/d/yyy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-OM"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-QA.min.js b/build/production/date-ar-QA.min.js index a92e968a..0820a739 100644 --- a/build/production/date-ar-QA.min.js +++ b/build/production/date-ar-QA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ AM:"\u0635",PM:"\u0645",firstDayOfWeek:6,twoDigitYearMax:2029,mdy:"dmy","M/d/yyy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-QA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-SA.min.js b/build/production/date-ar-SA.min.js index 1b03fdad..12d7a51e 100644 --- a/build/production/date-ar-SA.min.js +++ b/build/production/date-ar-SA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Jun_Abbr:"\u062c\u0645\u0627\u062f\u0649\u00a0\u0627\u0644\u062b\u0627\u0646\u06 "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-SA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-SY.min.js b/build/production/date-ar-SY.min.js index 4cac02c3..c98c8315 100644 --- a/build/production/date-ar-SY.min.js +++ b/build/production/date-ar-SY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Nov_Abbr:"\u062a\u0634\u0631\u064a\u0646\u00a0\u0627\u0644\u062b\u0627\u0646\u06 "/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST", ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT", AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-SY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-TN.min.js b/build/production/date-ar-TN.min.js index cdf24c0d..c05f93d9 100644 --- a/build/production/date-ar-TN.min.js +++ b/build/production/date-ar-TN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ PM:"\u0645",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd-MM-yy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-TN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ar-YE.min.js b/build/production/date-ar-YE.min.js index 761114ce..fdb126c5 100644 --- a/build/production/date-ar-YE.min.js +++ b/build/production/date-ar-YE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ AM:"\u0635",PM:"\u0645",firstDayOfWeek:6,twoDigitYearMax:2029,mdy:"dmy","M/d/yyy "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ar-YE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-az-Cyrl-AZ.min.js b/build/production/date-az-Cyrl-AZ.min.js index ad74c5a5..ab1c18ab 100644 --- a/build/production/date-az-Cyrl-AZ.min.js +++ b/build/production/date-az-Cyrl-AZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Apr_Abbr:"\u0410\u043f\u0440",May_Abbr:"\u041c\u0430\u0458",Jun_Abbr:"\u0418\u04 "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="az-Cyrl-AZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-az-Latn-AZ.min.js b/build/production/date-az-Latn-AZ.min.js index 5d12614b..7cd90e92 100644 --- a/build/production/date-az-Latn-AZ.min.js +++ b/build/production/date-az-Latn-AZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Aug_Abbr:"Avg",Sep_Abbr:"Sen",Oct_Abbr:"Okt",Nov_Abbr:"Noy",Dec_Abbr:"Dek",AM:"" "/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST", NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT", CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="az-Latn-AZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-be-BY.min.js b/build/production/date-be-BY.min.js index fa6f290c..33136562 100644 --- a/build/production/date-be-BY.min.js +++ b/build/production/date-be-BY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ December:"\u0421\u043d\u0435\u0436\u0430\u043d\u044c",Jan_Abbr:"\u0421\u0442\u04 "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="be-BY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-bg-BG.min.js b/build/production/date-bg-BG.min.js index d0e64472..f570c0be 100644 --- a/build/production/date-bg-BG.min.js +++ b/build/production/date-bg-BG.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ AM:"",PM:"",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd.M.yyy "/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST", CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="bg-BG"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-bs-Latn-BA.min.js b/build/production/date-bs-Latn-BA.min.js index 3b7ae0fe..265dc2f4 100644 --- a/build/production/date-bs-Latn-BA.min.js +++ b/build/production/date-bs-Latn-BA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"p",S_Sat_Initial:"s",January:"januar",February:"februar",March:"m "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="bs-Latn-BA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ca-ES.min.js b/build/production/date-ca-ES.min.js index 6b6598f6..df7980fc 100644 --- a/build/production/date-ca-ES.min.js +++ b/build/production/date-ca-ES.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"febrer",March:"mar\u00e7",April:"abril",May:"maig",June:"juny",July:"j "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ca-ES"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-cs-CZ.min.js b/build/production/date-cs-CZ.min.js index 53ae02be..a19fbf83 100644 --- a/build/production/date-cs-CZ.min.js +++ b/build/production/date-cs-CZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"d.M.yyyy","dddd, MMM "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="cs-CZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-cy-GB.min.js b/build/production/date-cy-GB.min.js index 88cea8d3..deca86b3 100644 --- a/build/production/date-cy-GB.min.js +++ b/build/production/date-cy-GB.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"S",January:"Ionawr",February:"Chwefror",March:"Mawrth",April:"Ebr "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="cy-GB"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-da-DK.min.js b/build/production/date-da-DK.min.js index 82e57391..063d61d1 100644 --- a/build/production/date-da-DK.min.js +++ b/build/production/date-da-DK.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"februar",March:"marts",April:"april",May:"maj",June:"juni",July:"juli" "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="da-DK"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-de-AT.min.js b/build/production/date-de-AT.min.js index c4102f56..bafd83f4 100644 --- a/build/production/date-de-AT.min.js +++ b/build/production/date-de-AT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februar",March:"M\u00e4rz",April:"April",May:"Mai",June:"Juni",July:"J "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="de-AT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-de-CH.min.js b/build/production/date-de-CH.min.js index ba4beab3..f248dbbd 100644 --- a/build/production/date-de-CH.min.js +++ b/build/production/date-de-CH.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februar",March:"M\u00e4rz",April:"April",May:"Mai",June:"Juni",July:"J "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="de-CH"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-de-DE.min.js b/build/production/date-de-DE.min.js index 20ff4f74..8b8cb798 100644 --- a/build/production/date-de-DE.min.js +++ b/build/production/date-de-DE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februar",March:"M\u00e4rz",April:"April",May:"Mai",June:"Juni",July:"J "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="de-DE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-de-LI.min.js b/build/production/date-de-LI.min.js index c98a18d4..334bc8dc 100644 --- a/build/production/date-de-LI.min.js +++ b/build/production/date-de-LI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februar",March:"M\u00e4rz",April:"April",May:"Mai",June:"Juni",July:"J "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="de-LI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-de-LU.min.js b/build/production/date-de-LU.min.js index d9a53522..f0ec6ca5 100644 --- a/build/production/date-de-LU.min.js +++ b/build/production/date-de-LU.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februar",March:"M\u00e4rz",April:"April",May:"Mai",June:"Juni",July:"J "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="de-LU"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-dv-MV.min.js b/build/production/date-dv-MV.min.js index 54a6ceb7..58c5a8dc 100644 --- a/build/production/date-dv-MV.min.js +++ b/build/production/date-dv-MV.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Jun_Abbr:"\u062c\u0645\u0627\u062f\u0649\u00a0\u0627\u0644\u062b\u0627\u0646\u06 "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="dv-MV"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-el-GR.min.js b/build/production/date-el-GR.min.js index 4dfecf26..357a3ee2 100644 --- a/build/production/date-el-GR.min.js +++ b/build/production/date-el-GR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ AM:"\u03c0\u03bc",PM:"\u03bc\u03bc",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"d "/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="el-GR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-029.min.js b/build/production/date-en-029.min.js index 0d195f15..769373ab 100644 --- a/build/production/date-en-029.min.js +++ b/build/production/date-en-029.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-029"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-AU.min.js b/build/production/date-en-AU.min.js index e266703c..bf314c9e 100644 --- a/build/production/date-en-AU.min.js +++ b/build/production/date-en-AU.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-AU"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-BZ.min.js b/build/production/date-en-BZ.min.js index 65751a1a..a5347944 100644 --- a/build/production/date-en-BZ.min.js +++ b/build/production/date-en-BZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-BZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-CA.min.js b/build/production/date-en-CA.min.js index d8901c77..3b0adfbc 100644 --- a/build/production/date-en-CA.min.js +++ b/build/production/date-en-CA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-CA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-GB.min.js b/build/production/date-en-GB.min.js index f6765bf6..0dce92af 100644 --- a/build/production/date-en-GB.min.js +++ b/build/production/date-en-GB.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-GB"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-IE.min.js b/build/production/date-en-IE.min.js index dad5ea0f..977ae1d6 100644 --- a/build/production/date-en-IE.min.js +++ b/build/production/date-en-IE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-IE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-JM.min.js b/build/production/date-en-JM.min.js index da9ed833..a08a628c 100644 --- a/build/production/date-en-JM.min.js +++ b/build/production/date-en-JM.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-JM"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-NZ.min.js b/build/production/date-en-NZ.min.js index 7113b15f..4f88526e 100644 --- a/build/production/date-en-NZ.min.js +++ b/build/production/date-en-NZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-NZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-PH.min.js b/build/production/date-en-PH.min.js index 2b91be2a..968f5ce8 100644 --- a/build/production/date-en-PH.min.js +++ b/build/production/date-en-PH.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"January",February:"February",March:"March",April:"April",May:"May",June "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-PH"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-TT.min.js b/build/production/date-en-TT.min.js index 67d05001..ea07b490 100644 --- a/build/production/date-en-TT.min.js +++ b/build/production/date-en-TT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"January",February:"February",March:"March",April:"April",May:"May",June "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-TT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-US.min.js b/build/production/date-en-US.min.js index 4c048740..3f1f9e91 100644 --- a/build/production/date-en-US.min.js +++ b/build/production/date-en-US.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -16,67 +16,67 @@ */ Date.CultureStrings=Date.CultureStrings||{}; Date.CultureStrings["en-US"]={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",Sun:"Sun",Mon:"Mon",Tue:"Tue",Wed:"Wed",Thu:"Thu",Fri:"Fri",Sat:"Sat",Su:"Su",Mo:"Mo",Tu:"Tu",We:"We",Th:"Th",Fr:"Fr",Sa:"Sa",S_Sun_Initial:"S",M_Mon_Initial:"M",T_Tue_Initial:"T",W_Wed_Initial:"W",T_Thu_Initial:"T",F_Fri_Initial:"F",S_Sat_Initial:"S",January:"January", -February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan_Abbr:"Jan",Feb_Abbr:"Feb",Mar_Abbr:"Mar",Apr_Abbr:"Apr",May_Abbr:"May",Jun_Abbr:"Jun",Jul_Abbr:"Jul",Aug_Abbr:"Aug",Sep_Abbr:"Sep",Oct_Abbr:"Oct",Nov_Abbr:"Nov",Dec_Abbr:"Dec",AM:"AM",PM:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,mdy:"mdy","M/d/yyyy":"M/d/yyyy","dddd, MMMM dd, yyyy":"dddd, MMMM dd, yyyy","h:mm tt":"h:mm tt", +February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",Jan_Abbr:"Jan",Feb_Abbr:"Feb",Mar_Abbr:"Mar",Apr_Abbr:"Apr",May_Abbr:"May",Jun_Abbr:"Jun",Jul_Abbr:"Jul",Aug_Abbr:"Aug",Sep_Abbr:"Sep",Oct_Abbr:"Oct",Nov_Abbr:"Nov",Dec_Abbr:"Dec",AM:"AM",PM:"PM",firstDayOfWeek:0,twoDigitYearMax:2049,mdy:"mdy","M/d/yyyy":"M/d/yyyy","dddd, MMMM dd, yyyy":"dddd, MMMM dd, yyyy","h:mm tt":"h:mm tt", "h:mm:ss tt":"h:mm:ss tt","dddd, MMMM dd, yyyy h:mm:ss tt":"dddd, MMMM dd, yyyy h:mm:ss tt","yyyy-MM-ddTHH:mm:ss":"yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ssZ":"yyyy-MM-dd HH:mm:ssZ","ddd, dd MMM yyyy HH:mm:ss":"ddd, dd MMM yyyy HH:mm:ss","MMMM dd":"MMMM dd","MMMM, yyyy":"MMMM, yyyy","/jan(uary)?/":"jan(uary)?","/feb(ruary)?/":"feb(ruary)?","/mar(ch)?/":"mar(ch)?","/apr(il)?/":"apr(il)?","/may/":"may","/jun(e)?/":"jun(e)?","/jul(y)?/":"jul(y)?","/aug(ust)?/":"aug(ust)?","/sep(t(ember)?)?/":"sep(t(ember)?)?", "/oct(ober)?/":"oct(ober)?","/nov(ember)?/":"nov(ember)?","/dec(ember)?/":"dec(ember)?","/^su(n(day)?)?/":"^su(n(day)?)?","/^mo(n(day)?)?/":"^mo(n(day)?)?","/^tu(e(s(day)?)?)?/":"^tu(e(s(day)?)?)?","/^we(d(nesday)?)?/":"^we(d(nesday)?)?","/^th(u(r(s(day)?)?)?)?/":"^th(u(r(s(day)?)?)?)?","/^fr(i(day)?)?/":"^fr(i(day)?)?","/^sa(t(urday)?)?/":"^sa(t(urday)?)?","/^next/":"^next","/^last|past|prev(ious)?/":"^last|past|prev(ious)?","/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)", "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-US"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-ZA.min.js b/build/production/date-en-ZA.min.js index 32657515..02902f1c 100644 --- a/build/production/date-en-ZA.min.js +++ b/build/production/date-en-ZA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-ZA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-en-ZW.min.js b/build/production/date-en-ZW.min.js index bcf6cb6a..ec590a7b 100644 --- a/build/production/date-en-ZW.min.js +++ b/build/production/date-en-ZW.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"February",March:"March",April:"April",May:"May",June:"June",July:"July "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="en-ZW"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-AR.min.js b/build/production/date-es-AR.min.js index 42a5a552..172640d3 100644 --- a/build/production/date-es-AR.min.js +++ b/build/production/date-es-AR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-AR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-BO.min.js b/build/production/date-es-BO.min.js index 4a886029..172e1ed1 100644 --- a/build/production/date-es-BO.min.js +++ b/build/production/date-es-BO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-BO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-CL.min.js b/build/production/date-es-CL.min.js index c0210058..dcdcbd17 100644 --- a/build/production/date-es-CL.min.js +++ b/build/production/date-es-CL.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-CL"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-CO.min.js b/build/production/date-es-CO.min.js index 37defd53..7257feee 100644 --- a/build/production/date-es-CO.min.js +++ b/build/production/date-es-CO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-CO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-CR.min.js b/build/production/date-es-CR.min.js index 2ec56a16..88089172 100644 --- a/build/production/date-es-CR.min.js +++ b/build/production/date-es-CR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-CR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-DO.min.js b/build/production/date-es-DO.min.js index 0cd4f4d2..9147db28 100644 --- a/build/production/date-es-DO.min.js +++ b/build/production/date-es-DO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"v",S_Sat_Initial:"s",January:"enero",February:"febrero",March:"ma "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-DO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-EC.min.js b/build/production/date-es-EC.min.js index 3a841ffe..5618b98e 100644 --- a/build/production/date-es-EC.min.js +++ b/build/production/date-es-EC.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-EC"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-ES.min.js b/build/production/date-es-ES.min.js index 814e82a1..bc2b557b 100644 --- a/build/production/date-es-ES.min.js +++ b/build/production/date-es-ES.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-ES"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-GT.min.js b/build/production/date-es-GT.min.js index b3a0a3f2..cafd6852 100644 --- a/build/production/date-es-GT.min.js +++ b/build/production/date-es-GT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-GT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-HN.min.js b/build/production/date-es-HN.min.js index e28bcc00..fe3adbdc 100644 --- a/build/production/date-es-HN.min.js +++ b/build/production/date-es-HN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-HN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-MX.min.js b/build/production/date-es-MX.min.js index 22f6fe34..40fa7f98 100644 --- a/build/production/date-es-MX.min.js +++ b/build/production/date-es-MX.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-MX"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-NI.min.js b/build/production/date-es-NI.min.js index 025ec6a4..c5abcd34 100644 --- a/build/production/date-es-NI.min.js +++ b/build/production/date-es-NI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-NI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-PA.min.js b/build/production/date-es-PA.min.js index 486580e8..dece74af 100644 --- a/build/production/date-es-PA.min.js +++ b/build/production/date-es-PA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-PA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-PE.min.js b/build/production/date-es-PE.min.js index 65e4d875..f63623c0 100644 --- a/build/production/date-es-PE.min.js +++ b/build/production/date-es-PE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-PE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-PR.min.js b/build/production/date-es-PR.min.js index 46aeb2f5..340f9faa 100644 --- a/build/production/date-es-PR.min.js +++ b/build/production/date-es-PR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"s",January:"enero",February:"febrero",March:"marzo",April:"abril" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-PR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-PY.min.js b/build/production/date-es-PY.min.js index 876a8a5b..48b36856 100644 --- a/build/production/date-es-PY.min.js +++ b/build/production/date-es-PY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-PY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-SV.min.js b/build/production/date-es-SV.min.js index 55f32bc0..24d12897 100644 --- a/build/production/date-es-SV.min.js +++ b/build/production/date-es-SV.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"s",January:"enero",February:"febrero",March:"marzo",April:"abril" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-SV"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-UY.min.js b/build/production/date-es-UY.min.js index ee69da42..e15dec7a 100644 --- a/build/production/date-es-UY.min.js +++ b/build/production/date-es-UY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"enero",February:"febrero",March:"marzo",April:"abril",May:"mayo",June:" "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-UY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-es-VE.min.js b/build/production/date-es-VE.min.js index f2db384c..fe4bcb9e 100644 --- a/build/production/date-es-VE.min.js +++ b/build/production/date-es-VE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"v",S_Sat_Initial:"s",January:"enero",February:"febrero",March:"ma "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="es-VE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-et-EE.min.js b/build/production/date-et-EE.min.js index 39b84a4b..012ac3ef 100644 --- a/build/production/date-et-EE.min.js +++ b/build/production/date-et-EE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"jaanuar",February:"veebruar",March:"m\u00e4rts",April:"aprill",May:"mai "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="et-EE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-eu-ES.min.js b/build/production/date-eu-ES.min.js index caa2f145..b1c4df02 100644 --- a/build/production/date-eu-ES.min.js +++ b/build/production/date-eu-ES.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"otsaila",March:"martxoa",April:"apirila",May:"maiatza",June:"ekaina",J "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="eu-ES"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fa-IR.min.js b/build/production/date-fa-IR.min.js index 6ec9594b..2f9bbc07 100644 --- a/build/production/date-fa-IR.min.js +++ b/build/production/date-fa-IR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"S",January:"January",February:"February",March:"March",April:"Apr "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fa-IR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fi-FI.min.js b/build/production/date-fi-FI.min.js index 654bb13a..5f9c4128 100644 --- a/build/production/date-fi-FI.min.js +++ b/build/production/date-fi-FI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"helmikuu",March:"maaliskuu",April:"huhtikuu",May:"toukokuu",June:"kes\ "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fi-FI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fo-FO.min.js b/build/production/date-fo-FO.min.js index 25062515..ac417416 100644 --- a/build/production/date-fo-FO.min.js +++ b/build/production/date-fo-FO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ W_Wed_Initial:"m",T_Thu_Initial:"h",F_Fri_Initial:"f",S_Sat_Initial:"l",January: "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fo-FO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fr-BE.min.js b/build/production/date-fr-BE.min.js index bb58d179..a351da86 100644 --- a/build/production/date-fr-BE.min.js +++ b/build/production/date-fr-BE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"f\u00e9vrier",March:"mars",April:"avril",May:"mai",June:"juin",July:"j "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fr-BE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fr-CA.min.js b/build/production/date-fr-CA.min.js index 6580a07c..f568d3f0 100644 --- a/build/production/date-fr-CA.min.js +++ b/build/production/date-fr-CA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"f\u00e9vrier",March:"mars",April:"avril",May:"mai",June:"juin",July:"j "/^yes(terday)?/":"^hier","/^t(od(ay)?)?/":"^aujourd'hui","/^tom(orrow)?/":"^demain","/^n(ow)?/":"^maintenant","/^ms|milli(second)?s?/":"^ms|milli(seconde)?s?","/^sec(ond)?s?/":"^sec(onde)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(eure)?s?","/^w(eek)?s?/":"^sem(aine)?s?","/^m(onth)?s?/":"^m(ois)?","/^d(ay)?s?/":"^j(our)?s?","/^y(ear)?s?/":"^a(nn\u00e9e)?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fr-CA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fr-CH.min.js b/build/production/date-fr-CH.min.js index 15d7f185..758410a4 100644 --- a/build/production/date-fr-CH.min.js +++ b/build/production/date-fr-CH.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"f\u00e9vrier",March:"mars",April:"avril",May:"mai",June:"juin",July:"j "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fr-CH"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fr-FR.min.js b/build/production/date-fr-FR.min.js index 93d7e78f..c786ccd1 100644 --- a/build/production/date-fr-FR.min.js +++ b/build/production/date-fr-FR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"f\u00e9vrier",March:"mars",April:"avril",May:"mai",June:"juin",July:"j "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fr-FR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fr-LU.min.js b/build/production/date-fr-LU.min.js index 7bf8549b..3f3fac34 100644 --- a/build/production/date-fr-LU.min.js +++ b/build/production/date-fr-LU.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"f\u00e9vrier",March:"mars",April:"avril",May:"mai",June:"juin",July:"j "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fr-LU"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-fr-MC.min.js b/build/production/date-fr-MC.min.js index d196f38f..9a51db97 100644 --- a/build/production/date-fr-MC.min.js +++ b/build/production/date-fr-MC.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"s",January:"janvier",February:"f\u00e9vrier",March:"mars",April:" "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="fr-MC"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-gl-ES.min.js b/build/production/date-gl-ES.min.js index a1bd6046..38bca327 100644 --- a/build/production/date-gl-ES.min.js +++ b/build/production/date-gl-ES.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"febreiro",March:"marzo",April:"abril",May:"maio",June:"xu\u00f1o",July "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="gl-ES"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-gu-IN.min.js b/build/production/date-gu-IN.min.js index 0b833306..3fc31fc4 100644 --- a/build/production/date-gu-IN.min.js +++ b/build/production/date-gu-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ PM:"\u0a89\u0aa4\u0acd\u0aa4\u0ab0\u00a0\u0aae\u0aa7\u0acd\u0aaf\u0abe\u0ab9\u0a "/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST", CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="gu-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-he-IL.min.js b/build/production/date-he-IL.min.js index a733b7e2..83be863b 100644 --- a/build/production/date-he-IL.min.js +++ b/build/production/date-he-IL.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Feb_Abbr:"\u05e4\u05d1\u05e8",Mar_Abbr:"\u05de\u05e8\u05e5",Apr_Abbr:"\u05d0\u05 "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="he-IL"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-hi-IN.min.js b/build/production/date-hi-IN.min.js index 6373033b..6c83a995 100644 --- a/build/production/date-hi-IN.min.js +++ b/build/production/date-hi-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd-MM-yyyy","dddd, M "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="hi-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-hr-BA.min.js b/build/production/date-hr-BA.min.js index e05777c9..f19465eb 100644 --- a/build/production/date-hr-BA.min.js +++ b/build/production/date-hr-BA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"p",S_Sat_Initial:"s",January:"sije\u010danj",February:"velja\u010 "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="hr-BA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-hr-HR.min.js b/build/production/date-hr-HR.min.js index 9748d864..f173e5e2 100644 --- a/build/production/date-hr-HR.min.js +++ b/build/production/date-hr-HR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"sije\u010danj",February:"velja\u010da",March:"o\u017eujak",April:"trava "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="hr-HR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-hu-HU.min.js b/build/production/date-hu-HU.min.js index a27ffb92..803626ba 100644 --- a/build/production/date-hu-HU.min.js +++ b/build/production/date-hu-HU.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ twoDigitYearMax:2029,mdy:"ymd","M/d/yyyy":"yyyy. MM. dd.","dddd, MMMM dd, yyyy": "/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST", CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="hu-HU"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-hy-AM.min.js b/build/production/date-hy-AM.min.js index 7f5e6f89..765b2256 100644 --- a/build/production/date-hy-AM.min.js +++ b/build/production/date-hy-AM.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Jan_Abbr:"\u0540\u0546\u054e",Feb_Abbr:"\u0553\u054f\u054e",Mar_Abbr:"\u0544\u05 "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="hy-AM"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-id-ID.min.js b/build/production/date-id-ID.min.js index 2b5aa118..03351662 100644 --- a/build/production/date-id-ID.min.js +++ b/build/production/date-id-ID.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februari",March:"Maret",April:"April",May:"Mei",June:"Juni",July:"Juli "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="id-ID"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-is-IS.min.js b/build/production/date-is-IS.min.js index f5980336..dd71cb23 100644 --- a/build/production/date-is-IS.min.js +++ b/build/production/date-is-IS.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Nov_Abbr:"n\u00f3v.",Dec_Abbr:"des.",AM:"",PM:"",firstDayOfWeek:1,twoDigitYearMa "/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)", LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST", BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="is-IS"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-it-CH.min.js b/build/production/date-it-CH.min.js index 7b8bdcd1..b9df9de8 100644 --- a/build/production/date-it-CH.min.js +++ b/build/production/date-it-CH.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"gennaio",February:"febbraio",March:"marzo",April:"aprile",May:"maggio", "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="it-CH"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-it-IT.min.js b/build/production/date-it-IT.min.js index 096c1efb..1e04229a 100644 --- a/build/production/date-it-IT.min.js +++ b/build/production/date-it-IT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"gennaio",February:"febbraio",March:"marzo",April:"aprile",May:"maggio", "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="it-IT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ja-JP.min.js b/build/production/date-ja-JP.min.js index dba2d37e..1f2edc94 100644 --- a/build/production/date-ja-JP.min.js +++ b/build/production/date-ja-JP.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ AM:"\u5348\u524d",PM:"\u5348\u5f8c",firstDayOfWeek:0,twoDigitYearMax:2029,mdy:"y "/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST", NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT", CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ja-JP"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ka-GE.min.js b/build/production/date-ka-GE.min.js index 6d667da9..6c2991ed 100644 --- a/build/production/date-ka-GE.min.js +++ b/build/production/date-ka-GE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Sep_Abbr:"\u10e1\u10d4\u10e5",Oct_Abbr:"\u10dd\u10e5\u10e2",Nov_Abbr:"\u10dc\u10 "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ka-GE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-kk-KZ.min.js b/build/production/date-kk-KZ.min.js index 6d17e5b0..df057af3 100644 --- a/build/production/date-kk-KZ.min.js +++ b/build/production/date-kk-KZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Jan_Abbr:"\u049a\u0430\u04a3",Feb_Abbr:"\u0410\u049b\u043f",Mar_Abbr:"\u041d\u04 "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="kk-KZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-kn-IN.min.js b/build/production/date-kn-IN.min.js index 424f91bd..e4e18132 100644 --- a/build/production/date-kn-IN.min.js +++ b/build/production/date-kn-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ AM:"\u0caa\u0cc2\u0cb0\u0ccd\u0cb5\u0cbe\u0cb9\u0ccd\u0ca8",PM:"\u0c85\u0caa\u0c "/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)", LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST", BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="kn-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ko-KR.min.js b/build/production/date-ko-KR.min.js index 02e0c112..2fda95c8 100644 --- a/build/production/date-ko-KR.min.js +++ b/build/production/date-ko-KR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Nov_Abbr:"11",Dec_Abbr:"12",AM:"\uc624\uc804",PM:"\uc624\ud6c4",firstDayOfWeek:0 "/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)", LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST", BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ko-KR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-kok-IN.min.js b/build/production/date-kok-IN.min.js index 1f9747d1..12111a55 100644 --- a/build/production/date-kok-IN.min.js +++ b/build/production/date-kok-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd-MM-yyyy","dddd, M "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="kok-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ky-KG.min.js b/build/production/date-ky-KG.min.js index 38605acd..00fbf73a 100644 --- a/build/production/date-ky-KG.min.js +++ b/build/production/date-ky-KG.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Feb_Abbr:"\u0424\u0435\u0432",Mar_Abbr:"\u041c\u0430\u0440",Apr_Abbr:"\u0410\u04 "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ky-KG"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-lt-LT.min.js b/build/production/date-lt-LT.min.js index 5e2675c5..300b98bf 100644 --- a/build/production/date-lt-LT.min.js +++ b/build/production/date-lt-LT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ mdy:"ymd","M/d/yyyy":"yyyy.MM.dd","dddd, MMMM dd, yyyy":"yyyy 'm.' MMMM d 'd.'", "/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST", CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="lt-LT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-lv-LV.min.js b/build/production/date-lv-LV.min.js index 50f230d1..cee65669 100644 --- a/build/production/date-lv-LV.min.js +++ b/build/production/date-lv-LV.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"janv\u0101ris",February:"febru\u0101ris",March:"marts",April:"apr\u012b "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="lv-LV"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-mi-NZ.min.js b/build/production/date-mi-NZ.min.js index f21940b8..51cb679d 100644 --- a/build/production/date-mi-NZ.min.js +++ b/build/production/date-mi-NZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ AM:"a.m.",PM:"p.m.",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":" "/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST", NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT", CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="mi-NZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-mk-MK.min.js b/build/production/date-mk-MK.min.js index e154b46e..b0d9e5ec 100644 --- a/build/production/date-mk-MK.min.js +++ b/build/production/date-mk-MK.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ December:"\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438",Jan_Abbr:"\u0458\u04 "/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT", MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="mk-MK"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-mn-MN.min.js b/build/production/date-mn-MN.min.js index 3046d901..bfb7a797 100644 --- a/build/production/date-mn-MN.min.js +++ b/build/production/date-mn-MN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ October:"10\u00a0\u0434\u0443\u0433\u0430\u0430\u0440\u00a0\u0441\u0430\u0440",N "/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST", ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT", AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="mn-MN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-mr-IN.min.js b/build/production/date-mr-IN.min.js index 53a72af9..6ee1c686 100644 --- a/build/production/date-mr-IN.min.js +++ b/build/production/date-mr-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ mdy:"dmy","M/d/yyyy":"dd-MM-yyyy","dddd, MMMM dd, yyyy":"dd MMMM yyyy","h:mm tt" "/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST", CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="mr-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ms-BN.min.js b/build/production/date-ms-BN.min.js index 532cba62..1e67c479 100644 --- a/build/production/date-ms-BN.min.js +++ b/build/production/date-ms-BN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"Januari",February:"Februari",March:"Mac",April:"April",May:"Mei",June:" "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ms-BN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ms-MY.min.js b/build/production/date-ms-MY.min.js index 009936c2..0420cb9c 100644 --- a/build/production/date-ms-MY.min.js +++ b/build/production/date-ms-MY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"Februari",March:"Mac",April:"April",May:"Mei",June:"Jun",July:"Julai", "/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ms-MY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-mt-MT.min.js b/build/production/date-mt-MT.min.js index a810c71e..5daa5ac4 100644 --- a/build/production/date-mt-MT.min.js +++ b/build/production/date-mt-MT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"\u0120",S_Sat_Initial:"S",January:"Jannar",February:"Frar",March: "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="mt-MT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-nb-NO.min.js b/build/production/date-nb-NO.min.js index 1a03a5f7..eae71ff4 100644 --- a/build/production/date-nb-NO.min.js +++ b/build/production/date-nb-NO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"l",January:"januar",February:"februar",March:"mars",April:"april" "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="nb-NO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-nl-BE.min.js b/build/production/date-nl-BE.min.js index 5add3e4c..675ead02 100644 --- a/build/production/date-nl-BE.min.js +++ b/build/production/date-nl-BE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"februari",March:"maart",April:"april",May:"mei",June:"juni",July:"juli "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="nl-BE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-nl-NL.min.js b/build/production/date-nl-NL.min.js index e35227b9..4a111927 100644 --- a/build/production/date-nl-NL.min.js +++ b/build/production/date-nl-NL.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"februari",March:"maart",April:"april",May:"mei",June:"juni",July:"juli "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="nl-NL"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-nn-NO.min.js b/build/production/date-nn-NO.min.js index a93c8839..0bfaeedd 100644 --- a/build/production/date-nn-NO.min.js +++ b/build/production/date-nn-NO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"januar",February:"februar",March:"mars",April:"april",May:"mai",June:"j "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="nn-NO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ns-ZA.min.js b/build/production/date-ns-ZA.min.js index a43ab968..73c962b3 100644 --- a/build/production/date-ns-ZA.min.js +++ b/build/production/date-ns-ZA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"S",January:"Pherekgong",February:"Hlakola",March:"Mopitlo",April: "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ns-ZA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-pa-IN.min.js b/build/production/date-pa-IN.min.js index 12ec9d8b..042f6cec 100644 --- a/build/production/date-pa-IN.min.js +++ b/build/production/date-pa-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ May_Abbr:"\u0a2e\u0a08",Jun_Abbr:"\u0a1c\u0a42\u0a28",Jul_Abbr:"\u0a1c\u0a41\u0a "/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="pa-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-pl-PL.min.js b/build/production/date-pl-PL.min.js index cf2759db..8ae64700 100644 --- a/build/production/date-pl-PL.min.js +++ b/build/production/date-pl-PL.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"stycze\u0144",February:"luty",March:"marzec",April:"kwiecie\u0144",May: "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="pl-PL"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-pt-BR.min.js b/build/production/date-pt-BR.min.js index 19c22df7..7b0a589a 100644 --- a/build/production/date-pt-BR.min.js +++ b/build/production/date-pt-BR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"s",S_Sat_Initial:"s",January:"janeiro",February:"fevereiro",March "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="pt-BR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-pt-PT.min.js b/build/production/date-pt-PT.min.js index c679189b..0eb87156 100644 --- a/build/production/date-pt-PT.min.js +++ b/build/production/date-pt-PT.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"s",S_Sat_Initial:"s",January:"Janeiro",February:"Fevereiro",March "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="pt-PT"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-quz-BO.min.js b/build/production/date-quz-BO.min.js index a3431f5d..1b5c8316 100644 --- a/build/production/date-quz-BO.min.js +++ b/build/production/date-quz-BO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"k",January:"Qulla puquy",February:"Hatun puquy",March:"Pauqar war "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="quz-BO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-quz-EC.min.js b/build/production/date-quz-EC.min.js index 39ee12f0..b0dd990e 100644 --- a/build/production/date-quz-EC.min.js +++ b/build/production/date-quz-EC.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"k",January:"Qulla puquy",February:"Hatun puquy",March:"Pauqar war "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="quz-EC"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-quz-PE.min.js b/build/production/date-quz-PE.min.js index 285c32d0..09bb870a 100644 --- a/build/production/date-quz-PE.min.js +++ b/build/production/date-quz-PE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"k",January:"Qulla puquy",February:"Hatun puquy",March:"Pauqar war "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="quz-PE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ro-RO.min.js b/build/production/date-ro-RO.min.js index db2e3fd9..189147d8 100644 --- a/build/production/date-ro-RO.min.js +++ b/build/production/date-ro-RO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ February:"februarie",March:"martie",April:"aprilie",May:"mai",June:"iunie",July: "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ro-RO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ru-RU.min.js b/build/production/date-ru-RU.min.js index 28d4181c..2cbb38db 100644 --- a/build/production/date-ru-RU.min.js +++ b/build/production/date-ru-RU.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Feb_Abbr:"\u0444\u0435\u0432",Mar_Abbr:"\u043c\u0430\u0440",Apr_Abbr:"\u0430\u04 "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ru-RU"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sa-IN.min.js b/build/production/date-sa-IN.min.js index bdfc3002..d888e651 100644 --- a/build/production/date-sa-IN.min.js +++ b/build/production/date-sa-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Oct_Abbr:"\u0905\u0915\u094d\u0924\u0942\u092c\u0930",Nov_Abbr:"\u0928\u0935\u09 "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sa-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-se-FI.min.js b/build/production/date-se-FI.min.js index ec9b3f43..24fb40ff 100644 --- a/build/production/date-se-FI.min.js +++ b/build/production/date-se-FI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Jun_Abbr:"geas",Jul_Abbr:"suoi",Aug_Abbr:"borg",Sep_Abbr:"\u010dak\u010d",Oct_Ab "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="se-FI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-se-NO.min.js b/build/production/date-se-NO.min.js index ca94564f..00c9c068 100644 --- a/build/production/date-se-NO.min.js +++ b/build/production/date-se-NO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Jun_Abbr:"geas",Jul_Abbr:"suoi",Aug_Abbr:"borg",Sep_Abbr:"\u010dak\u010d",Oct_Ab "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="se-NO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-se-SE.min.js b/build/production/date-se-SE.min.js index 024ff461..70711803 100644 --- a/build/production/date-se-SE.min.js +++ b/build/production/date-se-SE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Jun_Abbr:"geas",Jul_Abbr:"suoi",Aug_Abbr:"borg",Sep_Abbr:"\u010dak\u010d",Oct_Ab "/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="se-SE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sk-SK.min.js b/build/production/date-sk-SK.min.js index 5ea844fb..d38d9e8d 100644 --- a/build/production/date-sk-SK.min.js +++ b/build/production/date-sk-SK.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"s",January:"janu\u00e1r",February:"febru\u00e1r",March:"marec",Ap "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sk-SK"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sl-SI.min.js b/build/production/date-sl-SI.min.js index 7bcde94e..e6ec54cd 100644 --- a/build/production/date-sl-SI.min.js +++ b/build/production/date-sl-SI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"januar",February:"februar",March:"marec",April:"april",May:"maj",June:" "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sl-SI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sma-NO.min.js b/build/production/date-sma-NO.min.js index 1fb90eac..20ca5fe3 100644 --- a/build/production/date-sma-NO.min.js +++ b/build/production/date-sma-NO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ AM:"",PM:"",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd.MM.yy "/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT", MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="sma-NO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sma-SE.min.js b/build/production/date-sma-SE.min.js index 1ba30760..89ff4fc1 100644 --- a/build/production/date-sma-SE.min.js +++ b/build/production/date-sma-SE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ AM:"",PM:"",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"ymd","M/d/yyyy":"yyyy-MM- "/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT", MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"}; Date.CultureStrings.lang="sma-SE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-smj-NO.min.js b/build/production/date-smj-NO.min.js index a4792d1b..32289198 100644 --- a/build/production/date-smj-NO.min.js +++ b/build/production/date-smj-NO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Apr_Abbr:"vuor",May_Abbr:"moar",Jun_Abbr:"bieh",Jul_Abbr:"snji",Aug_Abbr:"b\u00e "/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="smj-NO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-smj-SE.min.js b/build/production/date-smj-SE.min.js index efb8f3b1..f8b17930 100644 --- a/build/production/date-smj-SE.min.js +++ b/build/production/date-smj-SE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ May_Abbr:"moar",Jun_Abbr:"bieh",Jul_Abbr:"snji",Aug_Abbr:"b\u00e5rg",Sep_Abbr:"r "/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="smj-SE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-smn-FI.min.js b/build/production/date-smn-FI.min.js index 47dfa9f8..3a09d256 100644 --- a/build/production/date-smn-FI.min.js +++ b/build/production/date-smn-FI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Jan_Abbr:"u\u0111iv",Feb_Abbr:"kuov",Mar_Abbr:"njuh",Apr_Abbr:"cuo\u014b",May_Ab "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="smn-FI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sms-FI.min.js b/build/production/date-sms-FI.min.js index 55be8577..8355ab6f 100644 --- a/build/production/date-sms-FI.min.js +++ b/build/production/date-sms-FI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -24,61 +24,61 @@ November:"skamm\u00b4m\u00e4\u00e4n",December:"rosttovm\u00e4\u00e4n",Jan_Abbr:" "/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST", ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT", AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sms-FI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sq-AL.min.js b/build/production/date-sq-AL.min.js index 848b55fe..bf126ccf 100644 --- a/build/production/date-sq-AL.min.js +++ b/build/production/date-sq-AL.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"P",S_Sat_Initial:"S",January:"janar",February:"shkurt",March:"mar "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sq-AL"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sr-Cyrl-BA.min.js b/build/production/date-sr-Cyrl-BA.min.js index cd934192..9da5fab7 100644 --- a/build/production/date-sr-Cyrl-BA.min.js +++ b/build/production/date-sr-Cyrl-BA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ December:"\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440",Jan_Abbr:"\u0458\u04 "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sr-Cyrl-BA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sr-Cyrl-CS.min.js b/build/production/date-sr-Cyrl-CS.min.js index 4f7b2c67..a937d502 100644 --- a/build/production/date-sr-Cyrl-CS.min.js +++ b/build/production/date-sr-Cyrl-CS.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Feb_Abbr:"\u0444\u0435\u0431",Mar_Abbr:"\u043c\u0430\u0440",Apr_Abbr:"\u0430\u04 "/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sr-Cyrl-CS"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sr-Latn-BA.min.js b/build/production/date-sr-Latn-BA.min.js index 4ecf329f..f17dc021 100644 --- a/build/production/date-sr-Latn-BA.min.js +++ b/build/production/date-sr-Latn-BA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ F_Fri_Initial:"p",S_Sat_Initial:"s",January:"januar",February:"februar",March:"m "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sr-Latn-BA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sr-Latn-CS.min.js b/build/production/date-sr-Latn-CS.min.js index d0a924fc..862204ff 100644 --- a/build/production/date-sr-Latn-CS.min.js +++ b/build/production/date-sr-Latn-CS.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"januar",February:"februar",March:"mart",April:"april",May:"maj",June:"j "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sr-Latn-CS"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sv-FI.min.js b/build/production/date-sv-FI.min.js index ed0d88ad..7c363e8d 100644 --- a/build/production/date-sv-FI.min.js +++ b/build/production/date-sv-FI.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"januari",February:"februari",March:"mars",April:"april",May:"maj",June: "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sv-FI"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sv-SE.min.js b/build/production/date-sv-SE.min.js index 04c680eb..493e90d7 100644 --- a/build/production/date-sv-SE.min.js +++ b/build/production/date-sv-SE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"L",January:"Januari",February:"Februari",March:"Mars",April:"Apri "/^(\\-|bef(ore)?|ago)/":"^(\\-|f\u00f6re|tidigare)","/^yes(terday)?/":"^i\\s?g\u00e5r|(f\u00f6r)g\u00e5r(dag)?","/^t(od(ay)?)?/":"^i\\s?dag?","/^tom(orrow)?/":"^i\\s?morgon|morgon(dag)?","/^n(ow)?/":"^nu","/^ms|milli(second)?s?/":"^ms|milli(sekund)?(er)?","/^sec(ond)?s?/":"^sek(und)?(er)?","/^mn|min(ute)?s?/":"^min(ut)?(er)?","/^h(our)?s?/":"^t(im)?(ar)?","/^w(eek)?s?/":"^v(eck(a)?)?(or)?","/^m(onth)?s?/":"^m(\u00e5nad)?(er)?","/^d(ay)?s?/":"^d(ag)?(ar)?","/^y(ear)?s?/":"^\u00e5(r)?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sv-SE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-sw-KE.min.js b/build/production/date-sw-KE.min.js index 8fe1a301..0dbee7bd 100644 --- a/build/production/date-sw-KE.min.js +++ b/build/production/date-sw-KE.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",Se "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="sw-KE"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-syr-SY.min.js b/build/production/date-syr-SY.min.js index 71d94faf..14d5b47c 100644 --- a/build/production/date-syr-SY.min.js +++ b/build/production/date-syr-SY.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd/MM/yyyy","dddd, MMMM dd, yyyy":"dd "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="syr-SY"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ta-IN.min.js b/build/production/date-ta-IN.min.js index 3e22f7ae..1937c3af 100644 --- a/build/production/date-ta-IN.min.js +++ b/build/production/date-ta-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ May_Abbr:"\u0bae\u0bc7",Jun_Abbr:"\u0b9c\u0bc2\u0ba9\u0bcd",Jul_Abbr:"\u0b9c\u0b "/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ta-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-te-IN.min.js b/build/production/date-te-IN.min.js index 1e984564..e7b32c02 100644 --- a/build/production/date-te-IN.min.js +++ b/build/production/date-te-IN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -26,61 +26,61 @@ Nov_Abbr:"\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d",Dec_Abbr:"\u0c21\u0c3f\u0c38\u0c "/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)", "/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT", AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="te-IN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-th-TH.min.js b/build/production/date-th-TH.min.js index 2b200a65..1c02fd19 100644 --- a/build/production/date-th-TH.min.js +++ b/build/production/date-th-TH.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ Apr_Abbr:"\u0e40\u0e21.\u0e22.",May_Abbr:"\u0e1e.\u0e04.",Jun_Abbr:"\u0e21\u0e34 "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="th-TH"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-tn-ZA.min.js b/build/production/date-tn-ZA.min.js index f04f3ea1..ca104f39 100644 --- a/build/production/date-tn-ZA.min.js +++ b/build/production/date-tn-ZA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"Ferikgong",February:"Tlhakole",March:"Mopitloe",April:"Moranang",May:"M "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="tn-ZA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-tr-TR.min.js b/build/production/date-tr-TR.min.js index fd2e2ac5..e59e36d4 100644 --- a/build/production/date-tr-TR.min.js +++ b/build/production/date-tr-TR.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"C",January:"Ocak",February:"\u015eubat",March:"Mart",April:"Nisan "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="tr-TR"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-tt-RU.min.js b/build/production/date-tt-RU.min.js index 452b727c..9ed7c191 100644 --- a/build/production/date-tt-RU.min.js +++ b/build/production/date-tt-RU.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ December:"\u0414\u0435\u043a\u0430\u0431\u0440\u044c",Jan_Abbr:"\u0413\u044b\u04 "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="tt-RU"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-uk-UA.min.js b/build/production/date-uk-UA.min.js index be5f2c43..bd6e6a2a 100644 --- a/build/production/date-uk-UA.min.js +++ b/build/production/date-uk-UA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ December:"\u0413\u0440\u0443\u0434\u0435\u043d\u044c",Jan_Abbr:"\u0421\u0456\u04 "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="uk-UA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-ur-PK.min.js b/build/production/date-ur-PK.min.js index 9b407160..cc395e39 100644 --- a/build/production/date-ur-PK.min.js +++ b/build/production/date-ur-PK.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -24,61 +24,61 @@ Jul_Abbr:"\u062c\u0648\u0644\u0627\u0678",Aug_Abbr:"\u0627\u06af\u0633\u062a",Se "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="ur-PK"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-uz-Cyrl-UZ.min.js b/build/production/date-uz-Cyrl-UZ.min.js index d608d6f7..55a7bf59 100644 --- a/build/production/date-uz-Cyrl-UZ.min.js +++ b/build/production/date-uz-Cyrl-UZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -25,61 +25,61 @@ May_Abbr:"\u041c\u0430\u0439",Jun_Abbr:"\u0418\u044e\u043d",Jul_Abbr:"\u0418\u04 "/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT", CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT", ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="uz-Cyrl-UZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-uz-Latn-UZ.min.js b/build/production/date-uz-Latn-UZ.min.js index 3677d49c..5968d261 100644 --- a/build/production/date-uz-Latn-UZ.min.js +++ b/build/production/date-uz-Latn-UZ.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"s",January:"yanvar",February:"fevral",March:"mart",April:"aprel", "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="uz-Latn-UZ"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-vi-VN.min.js b/build/production/date-vi-VN.min.js index be44158c..967eb5df 100644 --- a/build/production/date-vi-VN.min.js +++ b/build/production/date-vi-VN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ December:"Tha\u0301ng M\u01b0\u01a1\u0300i Hai",Jan_Abbr:"Thg1",Feb_Abbr:"Thg2", "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="vi-VN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-xh-ZA.min.js b/build/production/date-xh-ZA.min.js index 5bc06f84..f1a2069d 100644 --- a/build/production/date-xh-ZA.min.js +++ b/build/production/date-xh-ZA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ January:"eyoMqungu",February:"eyoMdumba",March:"eyoKwindla",April:"Tshazimpuzi", "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="xh-ZA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-zh-CN.min.js b/build/production/date-zh-CN.min.js index 83390704..37232936 100644 --- a/build/production/date-zh-CN.min.js +++ b/build/production/date-zh-CN.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Mar_Abbr:"\u4e09\u6708",Apr_Abbr:"\u56db\u6708",May_Abbr:"\u4e94\u6708",Jun_Abbr "/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)", "/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET", CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="zh-CN"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-zh-HK.min.js b/build/production/date-zh-HK.min.js index 108d0e3d..acf08994 100644 --- a/build/production/date-zh-HK.min.js +++ b/build/production/date-zh-HK.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"S",January:"January",February:"February",March:"March",April:"Apr "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="zh-HK"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-zh-MO.min.js b/build/production/date-zh-MO.min.js index a5df8272..a6fa1336 100644 --- a/build/production/date-zh-MO.min.js +++ b/build/production/date-zh-MO.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ December:"\u5341\u4e8c\u6708",Jan_Abbr:"\u4e00\u6708",Feb_Abbr:"\u4e8c\u6708",Ma "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="zh-MO"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-zh-SG.min.js b/build/production/date-zh-SG.min.js index 894f79ed..04d74567 100644 --- a/build/production/date-zh-SG.min.js +++ b/build/production/date-zh-SG.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Jan_Abbr:"\u4e00\u6708",Feb_Abbr:"\u4e8c\u6708",Mar_Abbr:"\u4e09\u6708",Apr_Abbr "/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="zh-SG"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-zh-TW.min.js b/build/production/date-zh-TW.min.js index 9a2739d2..b7b753af 100644 --- a/build/production/date-zh-TW.min.js +++ b/build/production/date-zh-TW.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -23,61 +23,61 @@ Jan_Abbr:"\u4e00\u6708",Feb_Abbr:"\u4e8c\u6708",Mar_Abbr:"\u4e09\u6708",Apr_Abbr "/^(\\+|aft(er)?|from|hence)/":"^(\\+|aft(er)?|from|hence)","/^(\\-|bef(ore)?|ago)/":"^(\\-|bef(ore)?|ago)","/^yes(terday)?/":"^yes(terday)?","/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)", "/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)","/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST", PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT",CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="zh-TW"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date-zu-ZA.min.js b/build/production/date-zu-ZA.min.js index f744b10f..787b6056 100644 --- a/build/production/date-zu-ZA.min.js +++ b/build/production/date-zu-ZA.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -22,61 +22,61 @@ S_Sat_Initial:"S",January:"uJanuwari",February:"uFebuwari",March:"uMashi",April: "/^t(od(ay)?)?/":"^t(od(ay)?)?","/^tom(orrow)?/":"^tom(orrow)?","/^n(ow)?/":"^n(ow)?","/^ms|milli(second)?s?/":"^ms|milli(second)?s?","/^sec(ond)?s?/":"^sec(ond)?s?","/^mn|min(ute)?s?/":"^mn|min(ute)?s?","/^h(our)?s?/":"^h(our)?s?","/^w(eek)?s?/":"^w(eek)?s?","/^m(onth)?s?/":"^m(onth)?s?","/^d(ay)?s?/":"^d(ay)?s?","/^y(ear)?s?/":"^y(ear)?s?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="zu-ZA"; -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this}; diff --git a/build/production/date.min.js b/build/production/date.min.js index 80d975d7..7d2a6369 100644 --- a/build/production/date.min.js +++ b/build/production/date.min.js @@ -1,6 +1,6 @@ /** * @overview datejs - * @version 1.0.0alpha-2014-01-07 + * @version 1.0.0-beta-2014-02-14 * @author Gregory Wild-Smith * @copyright 2014 Gregory Wild-Smith * @license MIT @@ -11,61 +11,61 @@ @license MIT @homepage https://github.com/abritinthebay/datejs */ -(function(){function g(b){var a,c,e,d=0,g=h,m=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):m.push(d));return String.fromCharCode.apply(null,m)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +(function(){function g(b){var a,c,e,d=0,g=h,l=[],t=b.length;for(a=0;a>e&c,g=f[256+g+e],g===h&&(65535>10),56320+(d&1023)):l.push(d));return String.fromCharCode.apply(null,l)}var h=0,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,0,12,24,36,60,96,84,12,12,12,48,72,12,12,12,12,12,12,12,12,12,12,12,12,12,0,12,12,12,12,12,0,12,0,12,12,12,24,12,12,12,12,12,24,12,24,12,12,12,12,12,12,12,12,12,24,12,12,12,12,12,24,12,12,12,12,12,12,12,24,12,12,12,12,12,12,12,12,12, -36,12,36,12,12,12,36,12,12,12,12,12,36,12,36,12,12,12,36,12,12,12,12,12,12,12,12,12,12],a=Date,d=Date.CultureStrings?Date.CultureStrings.lang:null,b={},c=function(a,c){var e,f,m,h=c?c:d;if(Date.CultureStrings&&Date.CultureStrings[h]&&Date.CultureStrings[h][a])e="string"===typeof Date.CultureStrings[h][a]?g(Date.CultureStrings[h][a]):Date.CultureStrings[h][a];else switch(a){case "name":e="en-US";break;case "englishName":e="English (United States)";break;case "nativeName":e="English (United States)"; -break;default:if(e=a,f=a.split("_"),m=f.length,1a?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames;b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1=== -this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b):this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays= -function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b, -0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760,"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&& -this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth= -function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d=function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate); -case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime);case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g, -function(a){if("\\"===a.charAt(0))return a.replace("\\","");e.h=e.getHours;switch(a){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h());case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()]; -case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()];case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator; -case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); +a)},currentLanguage:function(){return d||"en-US"},setLanguage:function(b,a){if(a||"en-US"===b||Date.CultureStrings&&Date.CultureStrings[b])d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l();else if(!Date.CultureStrings||!Date.CultureStrings[b])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+b+".js"),d=b,Date.CultureStrings.lang=b,Date.CultureInfo=l()}catch(c){throw Error("The DateJS IETF language tag '"+b+"' could not be loaded by Node. It likely does not exist."); +}else Date.Config&&Date.Config.i18n?e(b).done(function(){d=b;Date.CultureStrings.lang=b;Date.CultureInfo=l()}):Date.console.error("The DateJS IETF language tag '"+b+"' is not available and has not been loaded.")},getLoggedKeys:function(){return b},updateCultureInfo:function(){Date.CultureInfo=l()}};a.i18n.updateCultureInfo()})(); +(function(){var g=Date,h=g.prototype,f=function(b,a){a||(a=2);return("000"+b).slice(-1*a)};g.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};g.Config={};g.initOverloads=function(){g.now?g._now||(g._now=g.now):g._now=function(){return(new Date).getTime()};g.now=function(b){return b?g.present():g._now()};h.toISOString||(h.toISOString=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+ +1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===h._toString&&(h._toString=h.toString)};g.initOverloads();h.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};h.setTimeToNow=function(){var b=new Date;this.setHours(b.getHours());this.setMinutes(b.getMinutes());this.setSeconds(b.getSeconds());this.setMilliseconds(b.getMilliseconds()); +return this};g.today=function(){return(new Date).clearTime()};g.present=function(){return new Date};g.compare=function(b,a){if(isNaN(b)||isNaN(a))throw Error(b+" - "+a);if(b instanceof Date&&a instanceof Date)return ba?1:0;throw new TypeError(b+" - "+a);};g.equals=function(b,a){return 0===b.compareTo(a)};g.getDayName=function(b){return Date.CultureInfo.dayNames[b]};g.getDayNumberFromName=function(b){var a=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,d=Date.CultureInfo.shortestDayNames; +b=b.toLowerCase();for(var k=0;k=b.getTime()&&this.getTime()<=a.getTime()};h.isAfter=function(b){return 1===this.compareTo(b||new Date)};h.isBefore=function(b){return-1===this.compareTo(b||new Date)};h.isToday=h.isSameDay=function(b){return this.clone().clearTime().equals((b||new Date).clone().clearTime())};h.addMilliseconds=function(b){if(!b)return this;this.setTime(this.getTime()+1*b);return this};h.addSeconds=function(b){return b?this.addMilliseconds(1E3*b): +this};h.addMinutes=function(b){return b?this.addMilliseconds(6E4*b):this};h.addHours=function(b){return b?this.addMilliseconds(36E5*b):this};h.addDays=function(b){if(!b)return this;this.setDate(this.getDate()+1*b);return this};h.addWeekdays=function(b){if(!b)return this;var a=this.getDay(),e=Math.ceil(Math.abs(b)/7);(0===a||6===a)&&0b){for(;0>b;)this.addDays(-1),a=this.getDay(),0!==a&&6!==a&&b++;return this}if(5e?!1:!0};g.validateMillisecond=function(b){return a(b,0,999,"millisecond")};g.validateSecond=function(b){return a(b,0,59,"second")};g.validateMinute=function(b){return a(b,0,59,"minute")};g.validateHour=function(b){return a(b,0,23,"hour")};g.validateDay=function(b,c,e){return a(b,1,g.getDaysInMonth(c,e),"day")};g.validateWeek=function(b){return a(b,0,53,"week")};g.validateMonth=function(b){return a(b,0,11,"month")};g.validateYear=function(b){return a(b,-271822,275760, +"year")};h.set=function(b){g.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());g.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());g.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());g.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());g.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());g.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());g.validateDay(b.day,this.getFullYear(),this.getMonth())&& +this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);b.week&&g.validateWeek(b.week)&&this.setWeek(b.week);return this};h.moveToFirstDayOfMonth=function(){return this.set({day:1})};h.moveToLastDayOfMonth=function(){return this.set({day:g.getDaysInMonth(this.getFullYear(),this.getMonth())})};h.moveToNthOccurrence=function(b,a){if("Weekday"===b){if(0 +a)this.moveToLastDayOfMonth(),this.is().weekday()&&(a+=1);else return this;return this.addWeekdays(a)}var e=0;if(0b)return b=(b-1E4).toString(),b.charAt(0)+b.substr(2);b=(b+1E4).toString();return"+"+b.substr(1)};h.getElapsed=function(b){return(b||new Date)-this};var d= +function(b){switch(1*b){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};h.toString=function(b,a){var e=this;if(!a&&b&&1===b.length){var g,k=Date.CultureInfo.formatPatterns;e.t=e.toString;switch(b){case "d":return e.t(k.shortDate);case "D":return e.t(k.longDate);case "F":return e.t(k.fullDateTime);case "m":return e.t(k.monthDay);case "r":case "R":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.rfc1123)+" GMT";case "s":return e.t(k.sortableDateTime); +case "t":return e.t(k.shortTime);case "T":return e.t(k.longTime);case "u":return g=e.clone().addMinutes(e.getTimezoneOffset()),g.toString(k.universalSortableDateTime);case "y":return e.t(k.yearMonth)}}return b?b.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q)(?![^\[]*\]))/g,function(b){if("\\"===b.charAt(0))return b.replace("\\","");e.h=e.getHours;switch(b){case "hh":return f(13>e.h()?0===e.h()?12:e.h():e.h()-12);case "h":return 13>e.h()?0===e.h()?12:e.h():e.h()-12;case "HH":return f(e.h()); +case "H":return e.h();case "mm":return f(e.getMinutes());case "m":return e.getMinutes();case "ss":return f(e.getSeconds());case "s":return e.getSeconds();case "yyyy":return f(e.getFullYear(),4);case "yy":return f(e.getFullYear());case "dddd":return Date.CultureInfo.dayNames[e.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[e.getDay()];case "dd":return f(e.getDate());case "d":return e.getDate();case "MMMM":return Date.CultureInfo.monthNames[e.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[e.getMonth()]; +case "MM":return f(e.getMonth()+1);case "M":return e.getMonth()+1;case "t":return 12>e.h()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>e.h()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return d(e.getDate());case "Q":return"Q"+e.getQuarter();case "q":return String(e.getQuarter())}}).replace(/\[|\]/g,""):this._toString()}})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var g=Date.Parsing,h=[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];g.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};g.processTimeObject=function(a){var d,b;d=new Date;b=g.isLeapYear(a.year)?f:h;a.hours=a.hours?a.hours:0;a.minutes=a.minutes?a.minutes:0;a.seconds=a.seconds?a.seconds:0;a.milliseconds=a.milliseconds?a.milliseconds:0;a.year|| (a.year=d.getFullYear());if(a.month||!a.week&&!a.dayOfYear)a.month=a.month?a.month:0,a.day=a.day?a.day:1,a.dayOfYear=b[a.month]+a.day;else for(a.dayOfYear||(a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1,d=new Date(a.year,0,4),d=0===d.getDay()?7:d.getDay(),a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-(d+3)),d=0;d<=b.length;d++)if(a.dayOfYeara.length)return b.year=a,g.processTimeObject(b);a=a.match(this.regex);if(!a||!a.length)return null;for(d=0;dthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));if(this.day>g.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");a=new Date(this.year,this.month,this.day,this.hour,this.minute, this.second,this.millisecond);100>this.year&&a.setFullYear(this.year);this.timezone?a.set({timezone:this.timezone}):this.timezoneOffset&&a.set({timezoneOffset:this.timezoneOffset});return a},finish:function(a){a=a instanceof Array?h(a):[a];if(0===a.length)return null;for(var b=0;bthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday?this.weekday: -"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e=[],g=0;gthis.hour?this.hour+=12:"a"==this.meridian&&12==this.hour&&(this.hour=0));!this.weekday||"week"===this.unit||this.day||this.days||(c=Date[this.weekday](),this.day=c.getDate(),c.getMonth()!==a.getMonth()&&(this.month=c.getMonth()));!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"==this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value);if("week"==this.unit&&this.weeks&&!this.day&&!this.month)return a=Date[this.weekday? +this.weekday:"today"]().addWeeks(this.weeks),this.now&&a.setTimeToNow(),a;b&&this.timezone&&this.day&&this.days&&(this.day=this.days);return b?a.add(this):a.set(this)}};var f=g.Parsing.Operators,a=g.Grammar,d=g.Translator,b;a.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);a.timePartDelimiter=f.stoken(":");a.whiteSpace=f.rtoken(/^\s*/);a.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var c={};a.ctoken=function(a){var b=c[a];if(!b){for(var b=Date.CultureInfo.regexPatterns,d=a.split(/\s+/),e= +[],g=0;gc)throw new RangeError(g.getDayName(a)+ -" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},l=0;lc)throw new RangeError(g.getDayName(a)+ +" does not occur "+b+" times in the month of "+g.getMonthName(c.getMonth())+" "+c.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a){return function(){var b=g.today(),c=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(c+=7);return b.addDays(c)}},m=0;mg?-1:1,this.setMilliseconds(Math.abs(g)),this.setDays(Math.floor(this.getMilliseconds()/864E5)*b),this.setMilliseconds(this.getMilliseconds()%864E5),this.setHours(Math.floor(this.getMilliseconds()/36E5)*b),this.setMilliseconds(this.getMilliseconds()%36E5),this.setMinutes(Math.floor(this.getMilliseconds()/6E4)*b),this.setMilliseconds(this.getMilliseconds()%6E4),this.setSeconds(Math.floor(this.getMilliseconds()/ 1E3)*b),this.setMilliseconds(this.getMilliseconds()%1E3),this.setMilliseconds(this.getMilliseconds()*b));this.getTotalMilliseconds=function(){return 864E5*this.getDays()+36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return ba?1:0};this.equals=function(a){return 0===this.compareTo(a)}; this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/1E3)};this.addDays=function(a){return new TimeSpan(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new TimeSpan(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new TimeSpan(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+ 1E3*a)};this.addMilliseconds=function(a){return new TimeSpan(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds(); case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; -var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),m=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},l=0;lm?-1:1;this.years=m.getFullYear()-e.getFullYear();k.addYears(this.years);1===l?k>m&&0!==this.years&&this.years--:km&&e.clone().addDays(-e.getDaysInMonth())>m;)e.addMonths(-1),this.months--;e=m-e;0!==e&&(e=new TimeSpan(e), +var TimePeriod=function(g,h,f,a,d,b,c){for(var e="years months days hours minutes seconds milliseconds".split(/\s+/),l=function(a){return function(){return this[a]}},k=function(a){return function(b){this[a]=b;return this}},m=0;ml?-1:1;this.years=l.getFullYear()-e.getFullYear();k.addYears(this.years);1===m?k>l&&0!==this.years&&this.years--:kl&&e.clone().addDays(-e.getDaysInMonth())>l;)e.addMonths(-1),this.months--;e=l-e;0!==e&&(e=new TimeSpan(e), this.setDays(e.getDays()),this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()))}return this};