Permalink
Browse files

update for minor revision bump

  • Loading branch information...
1 parent a5c46b8 commit 8cca6d69ad3023645110209f0ffc4e531586ae44 @JerrySievert committed Jun 18, 2012
Showing with 12 additions and 12 deletions.
  1. +1 −1 README.md
  2. +2 −2 lib/date-utils.js
  3. +5 −5 lib/date-utils.min.js
  4. +1 −1 package.json
  5. +3 −3 test/date-format-test.js
View
@@ -24,7 +24,7 @@ Note: This did not work in the `REPL` before `Node.js 0.6` due to how `Node.js`
Date.yesterday(); // yesterday, 00:00:00
Date.tomorrow(); // tomorrow, 00:00:00
- Date.validateDay(year, month, day); // true/false whether a date is valid
+ Date.validateDay(day, year, month); // true/false whether a date is valid
Date.validateYear(year); // true/false whether a year is valid
Date.validateMonth(month); // true/false whether a month is valid
Date.validateHour(hour); // true/false whether an hour is valid
View
@@ -551,8 +551,8 @@ THE SOFTWARE.
polyfill('toYMD', function (separator) {
separator = typeof separator === 'undefined' ? '-' : separator;
- return this.getUTCFullYear() + separator + pad(this.getUTCMonth() + 1, 2) +
- separator + pad(this.getUTCDate(), 2);
+ return this.getFullYear() + separator + pad(this.getMonth() + 1, 2) +
+ separator + pad(this.getDate(), 2);
});
polyfill('toDBString', function () {
View
Oops, something went wrong.
View
@@ -1,7 +1,7 @@
{
"name": "date-utils",
"description": "Date add-ons for Node.js",
- "version": "1.2.10",
+ "version": "1.2.11",
"keywords": ["date", "utils", "date-utils", "time"],
"author": "Jerry Sievert <code@legitimatesounding.com> (http://legitimatesounding.com/blog/)",
"homepage": "http://github.com/JerrySievert/node-date-utils/",
View
@@ -128,21 +128,21 @@ vows.describe('Date Format').addBatch({
},
'when passing an argument to toYMD': {
- topic: function () { return new Date(Date.UTC(2011, 0, 1, 1, 1, 1, 0)).toYMD('-'); },
+ topic: function () { return new Date(2011, 0, 1, 1, 1, 1, 0).toYMD('-'); },
'the correct string is returned': function (topic) {
assert.equal(topic, '2011-01-01');
}
},
'when passing an empty argument to toYMD': {
- topic: function () { return new Date(Date.UTC(2011, 0, 1, 1, 1, 1, 0)).toYMD(''); },
+ topic: function () { return new Date(2011, 0, 1, 1, 1, 1, 0).toYMD(''); },
'the correct string is returned': function (topic) {
assert.equal(topic, '20110101');
}
},
'when passing no argument to toYMD': {
- topic: function () { return new Date(Date.UTC(2011, 0, 1, 1, 1, 1, 0)).toYMD(); },
+ topic: function () { return new Date(2011, 0, 1, 1, 1, 1, 0).toYMD(); },
'the correct default is chosen and the string is returned': function (topic) {
assert.equal(topic, '2011-01-01');
}

0 comments on commit 8cca6d6

Please sign in to comment.