Socket
Socket
Sign inDemoInstall

date-fns

Package Overview
Dependencies
0
Maintainers
3
Versions
200
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-rc1 to 1.0.0-rc2

3

compare_asc/index.js

@@ -8,3 +8,4 @@ var parse = require('../parse')

* @description
* Compare the two dates and return -1, 0 or 1.
* Compare the two dates and return 1 if the first date is after the second,
* -1 if the first date is before the second or 0 if dates are equal.
*

@@ -11,0 +12,0 @@ * @param {Date|String|Number} dateLeft - the first date to compare

@@ -8,3 +8,4 @@ var parse = require('../parse')

* @description
* Compare the two dates reverse chronologically and return -1, 0 or 1.
* Compare the two dates and return -1 if the first date is after the second,
* 1 if the first date is before the second or 0 if dates are equal.
*

@@ -31,5 +32,5 @@ * @param {Date|String|Number} dateLeft - the first date to compare

* //=> [
* // Sun Jul 02 1995 00:00:00
* // Sun Jul 02 1995 00:00:00,
* // Mon Jul 10 1989 00:00:00,
* // Wed Feb 11 1987 00:00:00,
* // Wed Feb 11 1987 00:00:00
* // ]

@@ -36,0 +37,0 @@ */

@@ -18,3 +18,3 @@ var distanceInWords = require('../distance_in_words')

* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..29] days |
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |

@@ -55,3 +55,3 @@ * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |

* // What is the distance between 1 January 2015 00:00:15
* and 1 January 2015 00:00:00, including seconds?
* // and 1 January 2015 00:00:00, including seconds?
* var result = distanceInWords(

@@ -58,0 +58,0 @@ * new Date(2015, 0, 1, 0, 0, 15),

@@ -26,3 +26,3 @@ var isBefore = require('../is_before')

* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..29] days |
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |

@@ -81,3 +81,4 @@ * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |

var seconds = differenceInSeconds(dateTo, dateFrom)
var minutes = Math.round(seconds / 60)
var offset = dateTo.getTimezoneOffset() - dateFrom.getTimezoneOffset()
var minutes = Math.round(seconds / 60) - offset

@@ -84,0 +85,0 @@ // 0 up to 2 mins

@@ -21,3 +21,3 @@ /**

* @example
* // for the invalid date:
* // For the invalid date:
* var result = isValid(new Date(''))

@@ -24,0 +24,0 @@ * //=> false

{
"name": "date-fns",
"version": "1.0.0-rc1",
"author": "Sasha Koss <kossnocorp@gmail.com>",
"description": "Date helpers",
"version": "1.0.0-rc2",
"author": "Sasha Koss <koss@nocorp.me>",
"description": "Modern JavaScript date utility library",
"repository": "https://github.com/date-fns/date-fns",

@@ -7,0 +7,0 @@ "engine": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc