Changelog
[1.5.2] - 2016-10-13
Incorrectly generated docs for format
.
Fixed typo in I18n doc.
Changelog
[1.5.1] - 2016-10-12
Changelog
[1.1.0] - 2016-05-19
Flow declarations for each function in the ".js.flow" style. Kudos to @JohnyDays. See related PRs:
Changelog
[1.0.0] - 2016-05-18
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).
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.
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
.