Socket
Socket
Sign inDemoInstall

date-fns

Package Overview
Dependencies
0
Maintainers
2
Versions
200
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
1517
20Next

1.3.0

Diff

Changelog

Source

[1.3.0] - 2016-05-26

Added

  • closestIndexTo
leshakoss
published 1.2.0 •

Changelog

Source

[1.2.0] - 2016-05-23

Added

  • Added an ability to pass negative numbers to setDay.
leshakoss
published 1.1.1 •

Changelog

Source

[1.1.1] - 2016-05-19

Fixed

  • Fixed Flow declarations for some of the functions.
kossnocorp
published 1.1.0 •

Changelog

Source

[1.1.0] - 2016-05-19

Added

kossnocorp
published 1.0.0 •

Changelog

Source

[1.0.0] - 2016-05-18

Fixed

  • format now returns the correct result for key E.

  • Prevent startOf..., endOf... and lastDayOf... functions to return dates with an incorrect time when the date is modifying into another time zone.

  • parse now parses years from 1 AD to 99 AD correctly.

  • Fix a bug in getISOWeek appearing because of a changing time zone (e.g., when the given date is in DST and the start of the ISO year is not).

Changed

  • BREAKING: all functions are moved to the root of the library, so they are now accessible with require('date-fns/name_of_function') or import nameOfFunction from 'date-fns/name_of_function'.

    // Before v1.0.0
    var addMonths = require("date-fns/src/add_months");
    
    // v1.0.0 onward
    var addMonths = require("date-fns/add_months");
    
  • BREAKING: functions that had the last optional argument weekStartsAt (i.e. endOfWeek, isSameWeek, lastDayOfWeek, setDay, startOfWeek) now instead receive the object options with the property options.weekStartsOn as the last argument.

    // Before v1.0.0
    var result = endOfWeek(new Date(2014, 8, 2), 1);
    
    // v1.0.0 onward
    var result = endOfWeek(new Date(2014, 8, 2), { weekStartsOn: 1 });
    
  • BREAKING: remove the function getTimeSinceMidnight that was used inside the other functions.

  • BREAKING: differenceInDays now returns the number of full days instead of calendar days.

  • BREAKING: eachDay and isWithinRange now throw an exception when the given range boundaries are invalid.

  • Faster isLeapYear.

  • Internal: make the documentation more verbose.

  • Internal: convert the tests from Chai to power-assert allowing them to run against IE8.

Added

  • addISOYears

  • closestTo

  • differenceInCalendarDays

  • differenceInCalendarISOWeeks

  • differenceInCalendarISOYears

  • differenceInCalendarMonths

  • differenceInCalendarQuarters

  • differenceInCalendarWeeks

  • differenceInCalendarYears

  • differenceInHours

  • differenceInISOYears

  • differenceInMilliseconds

  • differenceInMinutes

  • differenceInMonths

  • differenceInQuarters

  • differenceInSeconds

  • differenceInWeeks

  • differenceInYears

  • distanceInWords

  • distanceInWordsToNow

  • endOfISOWeek

  • endOfISOYear

  • endOfToday

  • endOfTomorrow

  • endOfYesterday

  • getDaysInYear

  • isDate

  • isFriday

  • isMonday

  • isSameISOWeek

  • isSameISOYear

  • isSaturday

  • isSunday

  • isThisHour

  • isThisISOWeek

  • isThisISOYear

  • isThisMinute

  • isThisMonth

  • isThisQuarter

  • isThisSecond

  • isThisWeek

  • isThisYear

  • isThursday

  • isTomorrow

  • isTuesday

  • isValid

  • isWednesday

  • isYesterday

  • lastDayOfISOWeek

  • lastDayOfISOYear

  • startOfISOWeek

  • startOfToday

  • startOfTomorrow

  • startOfYesterday

  • subISOYears

  • Add Qo, W, Wo, WW, GG, GGGG, Z, ZZ, X, x keys to format.

kossnocorp
published 1.0.0-rc22 •

kossnocorp
published 1.0.0-rc21 •

kossnocorp
published 1.0.0-rc19 •

kossnocorp
published 1.0.0-rc18 •

kossnocorp
published 1.0.0-rc17 •

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc