Socket
Socket
Sign inDemoInstall

daylight

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daylight - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

daylight.js

@@ -180,3 +180,3 @@ if ( typeof module !== 'undefined' ) {

case 'g':
return date.getHours() % 12;
return date.getHours() == 0 ? 12 : date.getHours() % 12;

@@ -189,3 +189,3 @@ // 24-hour format, no leading zero

case 'h':
var h = date.getHours() % 12;
var h = date.getHours() == 0 ? 12 : date.getHours() % 12;
return h < 10 ? '0' + h : h;

@@ -192,0 +192,0 @@

{
"name": "daylight",
"version": "0.2.1",
"version": "0.2.2",
"description": "lightweight javascript date formatting",

@@ -5,0 +5,0 @@ "main": "daylight.js",

@@ -143,2 +143,3 @@ var test = require('tape');

t.equal(formatDate('g', '2014/05/28 17:00:00'), '5');
t.equal(formatDate('g', '2014/05/28 00:00:00'), '12');

@@ -157,3 +158,4 @@ t.end();

t.equal(formatDate('h', date), '09');
t.equal(formatDate('g', '2014/05/28 17:00:00'), '5');
t.equal(formatDate('h', '2014/05/28 17:00:00'), '05');
t.equal(formatDate('h', '2014/05/28 00:00:00'), '12');

@@ -160,0 +162,0 @@ t.end();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc