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

date-fns

LICENSE
MIT
VISIBILITY
Public
subject⏳ Modern JavaScript date utility library ⌛️
1 collaborator
Labels
Clear
Labels
Done
No visible options
Clear
Done
Namespaces
Clear
Namespaces
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
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
startOfWeek(
  new Date(2014, 8, 2, 11, 55, 0)
date-fns /
start-of-week
v2.0.0
Return the start of a week for the given date.
Build: Pass
public
mit
1 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
lastDayOfWeek(
  new Date(2014, 8, 2, 11, 55, 0)
date-fns /
last-day-of-week
v2.0.0
Return the last day of a week for the given date.
Build: Pass
public
mit
1 KB
eachDayOfInterval({
  start: new Date(2014, 9, 6),
  end: new Date(2014, 9, 10)
});
date-fns /
each-day-of-interval
v2.0.0
Return the array of dates within the specified time interval...
Build: Pass
public
mit
1 KB
setISODay(new Date(2014, 8, 1), 7);
date-fns /
set-iso-day
v2.0.0
Set the day of the ISO week to the given date.
Build: Pass
public
mit
1 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