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

simpletime

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpletime - npm Package Compare versions

Comparing version 0.1.16 to 0.1.17

2

package.json
{
"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 @@

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