simpletime
Advanced tools
Comparing version 0.1.16 to 0.1.17
{ | ||
"name": "simpletime", | ||
"version": "0.1.16", | ||
"version": "0.1.17", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -1,3 +0,3 @@ | ||
// Filename: SimpleTime.js | ||
// Timestamp: 2013.05.18-15:02:22 (last modified) | ||
// Filename: simpletime.js | ||
// Timestamp: 2013.09.15-20:47:27 (last modified) | ||
// Author(s): Bumblehead (www.bumblehead.com) | ||
@@ -9,3 +9,3 @@ // | ||
// simpleTime namespace is defined here with a property named 'localeMethods'. | ||
// localeMethods are rederined by worldTime, which uses this script to provide | ||
// localeMethods are redefined by worldTime, which uses this script to provide | ||
// internationalized time formatted methods. | ||
@@ -17,3 +17,3 @@ // | ||
var SimpleTime = | ||
var simpletime = | ||
((typeof module === 'object') ? module : {}).exports = (function () { | ||
@@ -20,0 +20,0 @@ |
@@ -530,2 +530,82 @@ var SimpleTime = require('../simpletime'); | ||
}); | ||
it("should return a correctly formatted date from date object, `dd-MM-yy`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "dd-MM-yy"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = '05-04-13'; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `M/d/yy`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "M/d/yy"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = '4/5/13'; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `dd-MM-yyyy`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "dd-MM-yyyy"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = '05-04-2013'; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `MMM d, y`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "MMM d, y"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = 'Apr 5, 2013'; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `MMMM d, y`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "MMMM d, y"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = 'April 5, 2013'; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `5 'de' April 'de' 2013`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "d 'de' MMMM 'de' y"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = "5 'de' April 'de' 2013"; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `EEEE, d 'de' MMMM 'de' y`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "EEEE, d 'de' MMMM 'de' y"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = "Friday, 5 'de' April 'de' 2013"; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
it("should return a correctly formatted date from date object, `EEEE, MMMM d, y`", function () { | ||
//Fri Apr 05 2013 21:23:41 GMT-0700 (PDT) | ||
var date = new Date(1365222221485); | ||
var dateFormatShort = "EEEE, MMMM d, y"; | ||
result = SimpleTime.applyFormatDate(date, dateFormatShort); | ||
resultExpected = "Friday, April 5, 2013"; | ||
expect( result ).toBe( resultExpected ); | ||
}); | ||
}); | ||
@@ -532,0 +612,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1348
65351
7