any-date-parser
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "any-date-parser", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Parse a wide range of date formats including human-input dates", | ||
@@ -5,0 +5,0 @@ "tags": [ |
# any-date-parser | ||
[![Build Status](https://travis-ci.org/kensnyder/any-date-parser.svg?branch=master&v=1.0.0)](https://travis-ci.org/kensnyder/any-date-parser) | ||
[![Code Coverage](https://codecov.io/gh/kensnyder/any-date-parser/branch/master/graph/badge.svg?v=1.0.0)](https://codecov.io/gh/kensnyder/any-date-parser) | ||
[![MIT License](https://img.shields.io/npm/l/any-date-parser.svg?v=1.0.0)](https://opensource.org/licenses/ISC) | ||
[![Build Status](https://travis-ci.org/kensnyder/any-date-parser.svg?branch=master&v=1.0.1)](https://travis-ci.org/kensnyder/any-date-parser) | ||
[![Code Coverage](https://codecov.io/gh/kensnyder/any-date-parser/branch/master/graph/badge.svg?v=1.0.1)](https://codecov.io/gh/kensnyder/any-date-parser) | ||
[![ISC License](https://img.shields.io/npm/l/any-date-parser.svg?v=1.0.1)](https://opensource.org/licenses/ISC) | ||
@@ -18,3 +18,3 @@ Parse a wide range of date formats including human-input dates. | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/any-date-parser@1/dist/browser-bundle.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/any-date-parser@1.0.1/dist/browser-bundle.js"></script> | ||
``` | ||
@@ -21,0 +21,0 @@ |
@@ -11,3 +11,3 @@ const LocaleHelper = require('../../LocaleHelper/LocaleHelper.js'); | ||
let [, dateExpr, hour, minute, second, ampm] = matches; | ||
let result; | ||
let result = {}; | ||
if (dateExpr) { | ||
@@ -19,9 +19,2 @@ result = this.parser.attempt(dateExpr, locale); | ||
} | ||
} else { | ||
const now = new Date(); | ||
result = { | ||
year: now.getUTCFullYear(), | ||
month: now.getUTCMonth(), | ||
day: now.getUTCDate(), | ||
}; | ||
} | ||
@@ -28,0 +21,0 @@ const tpl = LocaleHelper.factory(locale); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123414
2867