Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

s-date

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s-date - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

4

etc/.eslint.json
{
"extends": "@seabass",
"rules": {
"complexity": [2, 13]
"complexity": [2, 13],
"no-var": 0,
"prefer-template": 0
}
}

@@ -105,24 +105,24 @@ 'use strict';

return format
.replace('{yyyy}', yyyy)
.replace('{yy}', yy)
.replace('{m}', m)
.replace('{mm}', mm)
.replace('{Month}', month)
.replace('{Mo}', month.substr(0, 3))
.replace('{d}', day)
.replace('{dd}', dd)
.replace('{ds}', dayWithSuffix)
.replace('{Weekday}', weekday)
.replace('{Day}', weekday.substr(0, 3))
.replace('{Dy}', weekday.substr(0, 2))
.replace('{D}', weekday[0])
.replace('{h24}', hours24)
.replace('{hh24}', hh24)
.replace('{h}', hours)
.replace('{hh}', hh)
.replace('{ampm}', ampm)
.replace('{AMPM}', ampm.toUpperCase())
.replace('{Minutes}', minutes)
.replace('{Seconds}', seconds);
.replace(/\{yyyy\}/g, yyyy)
.replace(/\{yy\}/g, yy)
.replace(/\{m\}/g, m)
.replace(/\{mm\}/g, mm)
.replace(/\{Month\}/g, month)
.replace(/\{Mo\}/g, month.substr(0, 3))
.replace(/\{d\}/g, day)
.replace(/\{dd\}/g, dd)
.replace(/\{ds\}/g, dayWithSuffix)
.replace(/\{Weekday\}/g, weekday)
.replace(/\{Day\}/g, weekday.substr(0, 3))
.replace(/\{Dy\}/g, weekday.substr(0, 2))
.replace(/\{D\}/g, weekday[0])
.replace(/\{h24\}/g, hours24)
.replace(/\{hh24\}/g, hh24)
.replace(/\{h\}/g, hours)
.replace(/\{hh\}/g, hh)
.replace(/\{ampm\}/g, ampm)
.replace(/\{AMPM\}/g, ampm.toUpperCase())
.replace(/\{Minutes\}/g, minutes)
.replace(/\{Seconds\}/g, seconds);
};
{
"name": "s-date",
"version": "1.2.0",
"version": "1.3.0",
"description": "Tiny date/time formatter",

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

@@ -180,2 +180,13 @@ // ----- dependencies

describe('repeats', function() {
it('should parse all repeats', function() {
expect(date('{d}{d}{d}', testDate)).to.equal('777');
expect(date('{d} {Seconds} {d}', testDate)).to.equal('7 04 7');
});
});
describe('multi-format', function() {

@@ -182,0 +193,0 @@

Sorry, the diff of this file is not supported yet

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