Comparing version 1.0.1 to 1.0.2
@@ -69,4 +69,6 @@ function $parcel$defineInteropFlag(a) { | ||
} | ||
Date.diff = (date11, date21)=>new $5f45703fc88f59e5$export$9099ad97b570f7c(date11, date21) | ||
; | ||
//# sourceMappingURL=date-diff.js.map |
@@ -59,2 +59,4 @@ const $8f392239b348c51c$var$divisors = { | ||
} | ||
Date.diff = (date11, date21)=>new $8f392239b348c51c$export$9099ad97b570f7c(date11, date21) | ||
; | ||
@@ -61,0 +63,0 @@ |
@@ -8,3 +8,3 @@ { | ||
"description": "DateDiff is a minimalized Javascript date arithmetic extension.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"keywords": [ | ||
@@ -11,0 +11,0 @@ "DateDiff", |
[![Build Status](https://github.com/melvinsembrano/date-diff/actions/workflows/test.yml/badge.svg)](https://travis-ci.org/melvinsembrano/date-diff) | ||
[![npm version](https://badge.fury.io/js/date-diff.svg)](https://badge.fury.io/js/date-diff) | ||
[![npm version](https://badge.fury.io/js/date-diff.svg)](https://badge.fury.io/js/date-diff) | ||
# DateDiff | ||
@@ -5,0 +5,0 @@ DateDiff is a minimalized javascript date arithmetic extension. |
@@ -139,2 +139,8 @@ import DateDiff from './date-diff' | ||
}) | ||
describe('Date.diff shorthand', () => { | ||
it('will return 1', () => { | ||
expect(Date.diff(today(), yearsAgo(1)).years()).toBe(1) | ||
}) | ||
}) | ||
}) |
@@ -78,1 +78,9 @@ const divisors = { | ||
} | ||
declare global { | ||
interface DateConstructor { | ||
diff(date1: Date, date2: Date): DateDiff | ||
} | ||
} | ||
Date.diff = (date1: Date, date2: Date) => new DateDiff(date1, date2) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
28408
340