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

parse-messy-time

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-messy-time - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

11

index.js

@@ -89,2 +89,12 @@ var months = [

}
else if (/noon/.test(t)) {
res.hours = 12
res.minutes = 0
res.seconds = 0
}
else if (/midnight/.test(t)) {
res.hours = 0
res.minutes = 0
res.seconds = 0
}
else if (/\d+[:h]\d+/.test(t) || /^(am|pm)/.test(next)) {

@@ -199,3 +209,2 @@ var hms = parseh(t, next);

}
var out = new Date(now);

@@ -202,0 +211,0 @@ out.setHours(res.hours === undefined ? 0 : res.hours);

2

package.json
{
"name": "parse-messy-time",
"version": "2.0.2",
"version": "2.1.0",
"description": "parse messy human date and time strings",

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

@@ -253,3 +253,13 @@ var parse = require('../');

);
t.equal(
strftime('%F %T', parse('tomorrow at noon', optsd)),
'2015-04-15 12:00:00',
'tomorrow at noon'
);
t.equal(
strftime('%F %T', parse('in 6 days at midnight', optsd)),
'2015-04-20 00:00:00',
'in 6 days at midnight'
);
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