datetimejs
Advanced tools
+1
-1
@@ -564,3 +564,3 @@ // Generated by CoffeeScript 1.6.3 | ||
| } | ||
| d = new Date(meta.year, meta.month, meta.date, (meta.timeAdjust ? hour24(meta.hour) : meta.hour), meta.minute, meta.second, meta.millisecond); | ||
| d = new Date(meta.year, meta.month, meta.date, (meta.timeAdjust ? hour24(meta.hour + 12) : meta.hour), meta.minute, meta.second, meta.millisecond); | ||
| if (meta.timezone != null) { | ||
@@ -567,0 +567,0 @@ localOffset = d.getTimezoneOffset(); |
+1
-1
@@ -40,3 +40,3 @@ { | ||
| }, | ||
| "version" : "0.3.2" | ||
| "version" : "0.3.3" | ||
| } |
@@ -795,3 +795,3 @@ ###! | ||
| meta.date, | ||
| (if meta.timeAdjust then hour24(meta.hour) else meta.hour), | ||
| (if meta.timeAdjust then hour24(meta.hour + 12) else meta.hour), | ||
| meta.minute, | ||
@@ -798,0 +798,0 @@ meta.second, |
@@ -45,2 +45,8 @@ # # Parser tests | ||
| it 'should parse AM PM', () -> | ||
| d = datetime.strptime '2013-12-01 09:00 a.m.', '%Y-%m-%d %I:%M %p' | ||
| assert.equal d.getHours(), 9 | ||
| d = datetime.strptime '2013-12-01 09:00 p.m.', '%Y-%m-%d %I:%M %p' | ||
| assert.equal d.getHours(), 21 | ||
| describe '#isoparse()', () -> | ||
@@ -47,0 +53,0 @@ it 'should parse date in ISO format', () -> |
@@ -68,3 +68,3 @@ // Generated by CoffeeScript 1.6.3 | ||
| }); | ||
| return it('should parse decimal seconds', function() { | ||
| it('should parse decimal seconds', function() { | ||
| var d; | ||
@@ -75,2 +75,9 @@ d = datetime.strptime('2013-12-01 12:00:01.12', '%Y-%m-%d %H:%M:%f'); | ||
| }); | ||
| return it('should parse AM PM', function() { | ||
| var d; | ||
| d = datetime.strptime('2013-12-01 09:00 a.m.', '%Y-%m-%d %I:%M %p'); | ||
| assert.equal(d.getHours(), 9); | ||
| d = datetime.strptime('2013-12-01 09:00 p.m.', '%Y-%m-%d %I:%M %p'); | ||
| return assert.equal(d.getHours(), 21); | ||
| }); | ||
| }); | ||
@@ -77,0 +84,0 @@ return describe('#isoparse()', function() { |
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
345912
0.19%9803
0.07%