We’re excited to announce Bit’s new home at bit.dev!Learn more

date-fns

1 Members
Date
isValid(new Date(2014, 1, 31));
date-fns /
is-valid
v2.0.0
Returns false if argument is Invalid Date and true otherwise...
Build: Pass
public
mit
isDate(new Date());
date-fns /
is-date
v2.0.0
Returns true if the given value is an instance of Date. The ...
Build: Fail
public
mit
getWeekYear( new Date(2004, 11, 26), { weekStartsOn: 6 }
date-fns /
get-week-year
v2.0.0
Get the local week-numbering year of the given date.
Build: Pass
public
mit
formatDistanceStrict( new Date(2015, 0, 1), new Date(2016, 0, 1), { addSuffix: true }
date-fns /
format-distance-strict
v2.0.0
Return the distance between the given dates in words, using ...
Build: Pass
public
mit
setYear(new Date(2014, 8, 1), 2013);
date-fns /
set-year
v2.0.0
Set the year to the given date.
Build: Pass
public
mit
setDate(new Date(2014, 8, 1), 30);
date-fns /
set-date
v2.0.0
Set the day of the month to the given date.
Build: Pass
public
mit
Number
getWeekYear( new Date(2004, 11, 26), { weekStartsOn: 6 }
date-fns /
get-week-year
v2.0.0
Get the local week-numbering year of the given date.
Build: Pass
public
mit
addMilliseconds( new Date( 2014, 6, 10, 12, 45, 30, 0 ), 750
date-fns /
add-milliseconds
v2.0.0
Add the specified number of milliseconds to the given date.
Build: Pass
public
mit
differenceInCalendarMonths( new Date(2014, 8, 1), new Date(2014, 0, 31)
date-fns /
difference-in-calendar-months
v2.0.0
Get the number of calendar months between the given dates.
Build: Pass
public
mit
addSeconds( new Date(2014, 6, 10, 12, 45, 0), 30
date-fns /
add-seconds
v2.0.0
Add the specified number of seconds to the given date.
Build: Pass
public
mit
setISOWeek( new Date(2004, 7, 7), 53
date-fns /
set-iso-week
v2.0.0
Set the ISO week to the given date, saving the weekday numbe...
Build: Pass
public
mit
getWeeksInMonth( new Date(2017, 6, 5), { weekStartsOn: 1 }
date-fns /
get-weeks-in-month
v2.0.0
Get the number of calendar weeks the month in the given date...
Build: Pass
public
mit
getDaysInYear(new Date(2012, 0, 1));
date-fns /
get-days-in-year
v2.0.0
Get the number of days in a year of the given date.
Build: Pass
public
mit
addYears(new Date(2014, 8, 1), 5);
date-fns /
add-years
v2.0.0
Add the specified number of years to the given date.
Build: Pass
public
mit