Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

date-fns

LOCATION
Spacetime
subject
Modern JavaScript date utility library
2 Members
Labels
Clear
Labels
Done
No visible options
Clear
Done
Dependencies
Clear
Dependencies
Done
No visible options
Clear
Done
No size data available
Size
Clear
Size
Done
Choose size range
?
Component bundled with dependencies, minified and gzip'ed
0 B
50 KB +
Component bundled with dependencies,minified and gzip'ed
Clear
Done
More options
Clear
More options
Done
Component features
Tests
Usage examples
Visual rendering
Clear
Done
Date
parse(
  "02/11/2014",
  "MM/dd/yyyy",
  new Date()
date-fns /
parse
v2.0.0
Return the date parsed from string using the given format st...
Build: Pass
public
mit
8 KB
formatDistance(
  new Date(2014, 6, 2),
  new Date(2015, 0, 1)
date-fns /
format-distance
v2.0.0
Return the distance between the given dates in words.
Build: Pass
public
mit
4 KB
setDay(new Date(2014, 8, 1), 0, {
  weekStartsOn: 1
});
date-fns /
set-day
v2.0.0
Set the day of the week to the given date.
Build: Pass
public
mit
1 KB
endOfWeek(
  new Date(2014, 8, 2, 11, 55, 0),
  {
    weekStartsOn: 1
  }
date-fns /
end-of-week
v2.0.0
Return the end of a week for the given date.
Build: Pass
public
mit
1 KB
setWeek(new Date(2005, 0, 2), 1);
date-fns /
set-week
v2.0.0
Set the local week to the given date, saving the weekday num...
Build: Pass
public
mit
1 KB
differenceInISOWeekYears(
  new Date(2012, 0, 1),
  new Date(2010, 0, 1)
date-fns /
difference-in-iso-week-years
v2.0.0
Get the number of full ISO week-numbering years between the ...
Build: Pass
public
mit
2 KB
Number
setWeek(new Date(2005, 0, 2), 1);
date-fns /
set-week
v2.0.0
Set the local week to the given date, saving the weekday num...
Build: Pass
public
mit
1 KB
differenceInISOWeekYears(
  new Date(2012, 0, 1),
  new Date(2010, 0, 1)
date-fns /
difference-in-iso-week-years
v2.0.0
Get the number of full ISO week-numbering years between the ...
Build: Pass
public
mit
2 KB
setWeekYear(
  new Date(2010, 0, 2),
  2004
date-fns /
set-week-year
v2.0.0
Set the local week-numbering year to the given date,
Build: Pass
public
mit
2 KB
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
928 B
differenceInCalendarQuarters(
  new Date(2014, 6, 2),
  new Date(2013, 11, 31)
date-fns /
difference-in-calendar-quarters
v2.0.0
Get the number of calendar quarters between the given dates.
Build: Pass
public
mit
1000 B
differenceInCalendarYears(
  new Date(2015, 1, 11),
  new Date(2013, 11, 31)
date-fns /
difference-in-calendar-years
v2.0.0
Get the number of calendar years between the given dates.
Build: Pass
public
mit
908 B
differenceInCalendarISOWeeks(
  new Date(2014, 6, 21),
  new Date(2014, 6, 6)
date-fns /
difference-in-calendar-iso-weeks
v2.0.0
Get the number of calendar ISO weeks between the given dates...
Build: Pass
public
mit
1 KB
differenceInCalendarISOWeekYears(
  new Date(2012, 0, 1),
  new Date(2010, 0, 1)
date-fns /
difference-in-calendar-iso-week-years
v2.0.0
Get the number of calendar ISO week-numbering years between ...
Build: Pass
public
mit
1 KB