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

@financial-times/ft-date-format

Package Overview
Dependencies
Maintainers
16
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ft-date-format - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

.github/CODEOWNERS

4

index.js
const months = '["' + 'January,February,March,April,May,June,July,August,September,October,November,December'.split(',').join('","') + '"]';
const days = '["' + 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(',').join('","') + '"]';
const formats = {
datetime: 'MMMM d, yyyy h:mm a',
date: 'MMMM d, yyyy'
datetime: 'MMMM d yyyy h:mm a',
date: 'MMMM d yyyy'
};

@@ -7,0 +7,0 @@

@@ -6,3 +6,3 @@ /* eslint-env mocha */

const ftDateFormat = require('./index');
const window = typeof global === 'undefined' ? self : global;
const window = typeof global === 'undefined' ? self : global;

@@ -66,7 +66,7 @@ describe('o-date', () => {

it('returns a date if "date" is passed in as a second argument', () => {
proclaim.strictEqual(ftDateFormat.format(someDate, "date"), 'July 18, 2016');
proclaim.strictEqual(ftDateFormat.format(someDate, "date"), 'July 18 2016');
});
it('returns a datetime if "datetime" is passed in as a second argument', () => {
proclaim.strictEqual(ftDateFormat.format(someDate, "datetime"), 'July 18, 2016 11:12 pm');
proclaim.strictEqual(ftDateFormat.format(someDate, "datetime"), 'July 18 2016 11:12 pm');
});

@@ -76,3 +76,3 @@

const someDate = new Date("Mon Jul 18 2016 06:12:11");
proclaim.strictEqual(ftDateFormat.format(someDate, "datetime"), 'July 18, 2016 6:12 am');
proclaim.strictEqual(ftDateFormat.format(someDate, "datetime"), 'July 18 2016 6:12 am');
});

@@ -99,3 +99,3 @@

'21st', '22nd', '23rd', '24th', '25th', '26th', '27th', '28th', '29th', '30th', '31st'];
for (let i = 1; i <= days.length; i++) {

@@ -102,0 +102,0 @@ proclaim.strictEqual(ftDateFormat.format(new Date(2000, 0, i), 'do'), days[i - 1]);

{
"name": "@financial-times/ft-date-format",
"version": "1.0.3",
"version": "1.0.4",
"description": "Utility for formatting and updating dates for Financial-Times customer-facing products",

@@ -15,10 +15,10 @@ "main": "index.js",

"devDependencies": {
"karma": "^4.0.1",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"karma-webpack": "^3.0.5",
"mocha": "^6.0.2",
"proclaim": "^3.6.0",
"sinon": "^7.2.5",
"webpack": "^4.29.6"
"karma": "4.3.0",
"karma-chrome-launcher": "3.1.0",
"karma-mocha": "1.3.0",
"karma-webpack": "3.0.5",
"mocha": "6.2.0",
"proclaim": "3.6.0",
"sinon": "7.4.2",
"webpack": "4.40.2"
},

@@ -25,0 +25,0 @@ "dependencies": {},

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