This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/node_modules/date-fns
2025-06-13 14:04:40 +08:00
..
_lib Initial commit 2025-06-13 14:04:40 +08:00
add Initial commit 2025-06-13 14:04:40 +08:00
addBusinessDays Initial commit 2025-06-13 14:04:40 +08:00
addDays Initial commit 2025-06-13 14:04:40 +08:00
addHours Initial commit 2025-06-13 14:04:40 +08:00
addISOWeekYears Initial commit 2025-06-13 14:04:40 +08:00
addMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
addMinutes Initial commit 2025-06-13 14:04:40 +08:00
addMonths Initial commit 2025-06-13 14:04:40 +08:00
addQuarters Initial commit 2025-06-13 14:04:40 +08:00
addSeconds Initial commit 2025-06-13 14:04:40 +08:00
addWeeks Initial commit 2025-06-13 14:04:40 +08:00
addYears Initial commit 2025-06-13 14:04:40 +08:00
areIntervalsOverlapping Initial commit 2025-06-13 14:04:40 +08:00
clamp Initial commit 2025-06-13 14:04:40 +08:00
closestIndexTo Initial commit 2025-06-13 14:04:40 +08:00
closestTo Initial commit 2025-06-13 14:04:40 +08:00
compareAsc Initial commit 2025-06-13 14:04:40 +08:00
compareDesc Initial commit 2025-06-13 14:04:40 +08:00
constants Initial commit 2025-06-13 14:04:40 +08:00
daysToWeeks Initial commit 2025-06-13 14:04:40 +08:00
differenceInBusinessDays Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarDays Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarISOWeeks Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarISOWeekYears Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarMonths Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarQuarters Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarWeeks Initial commit 2025-06-13 14:04:40 +08:00
differenceInCalendarYears Initial commit 2025-06-13 14:04:40 +08:00
differenceInDays Initial commit 2025-06-13 14:04:40 +08:00
differenceInHours Initial commit 2025-06-13 14:04:40 +08:00
differenceInISOWeekYears Initial commit 2025-06-13 14:04:40 +08:00
differenceInMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
differenceInMinutes Initial commit 2025-06-13 14:04:40 +08:00
differenceInMonths Initial commit 2025-06-13 14:04:40 +08:00
differenceInQuarters Initial commit 2025-06-13 14:04:40 +08:00
differenceInSeconds Initial commit 2025-06-13 14:04:40 +08:00
differenceInWeeks Initial commit 2025-06-13 14:04:40 +08:00
differenceInYears Initial commit 2025-06-13 14:04:40 +08:00
docs Initial commit 2025-06-13 14:04:40 +08:00
eachDayOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachHourOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachMinuteOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachMonthOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachQuarterOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachWeekendOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachWeekendOfMonth Initial commit 2025-06-13 14:04:40 +08:00
eachWeekendOfYear Initial commit 2025-06-13 14:04:40 +08:00
eachWeekOfInterval Initial commit 2025-06-13 14:04:40 +08:00
eachYearOfInterval Initial commit 2025-06-13 14:04:40 +08:00
endOfDay Initial commit 2025-06-13 14:04:40 +08:00
endOfDecade Initial commit 2025-06-13 14:04:40 +08:00
endOfHour Initial commit 2025-06-13 14:04:40 +08:00
endOfISOWeek Initial commit 2025-06-13 14:04:40 +08:00
endOfISOWeekYear Initial commit 2025-06-13 14:04:40 +08:00
endOfMinute Initial commit 2025-06-13 14:04:40 +08:00
endOfMonth Initial commit 2025-06-13 14:04:40 +08:00
endOfQuarter Initial commit 2025-06-13 14:04:40 +08:00
endOfSecond Initial commit 2025-06-13 14:04:40 +08:00
endOfToday Initial commit 2025-06-13 14:04:40 +08:00
endOfTomorrow Initial commit 2025-06-13 14:04:40 +08:00
endOfWeek Initial commit 2025-06-13 14:04:40 +08:00
endOfYear Initial commit 2025-06-13 14:04:40 +08:00
endOfYesterday Initial commit 2025-06-13 14:04:40 +08:00
esm Initial commit 2025-06-13 14:04:40 +08:00
format Initial commit 2025-06-13 14:04:40 +08:00
formatDistance Initial commit 2025-06-13 14:04:40 +08:00
formatDistanceStrict Initial commit 2025-06-13 14:04:40 +08:00
formatDistanceToNow Initial commit 2025-06-13 14:04:40 +08:00
formatDistanceToNowStrict Initial commit 2025-06-13 14:04:40 +08:00
formatDuration Initial commit 2025-06-13 14:04:40 +08:00
formatISO Initial commit 2025-06-13 14:04:40 +08:00
formatISO9075 Initial commit 2025-06-13 14:04:40 +08:00
formatISODuration Initial commit 2025-06-13 14:04:40 +08:00
formatRelative Initial commit 2025-06-13 14:04:40 +08:00
formatRFC3339 Initial commit 2025-06-13 14:04:40 +08:00
formatRFC7231 Initial commit 2025-06-13 14:04:40 +08:00
fp Initial commit 2025-06-13 14:04:40 +08:00
fromUnixTime Initial commit 2025-06-13 14:04:40 +08:00
getDate Initial commit 2025-06-13 14:04:40 +08:00
getDay Initial commit 2025-06-13 14:04:40 +08:00
getDayOfYear Initial commit 2025-06-13 14:04:40 +08:00
getDaysInMonth Initial commit 2025-06-13 14:04:40 +08:00
getDaysInYear Initial commit 2025-06-13 14:04:40 +08:00
getDecade Initial commit 2025-06-13 14:04:40 +08:00
getDefaultOptions Initial commit 2025-06-13 14:04:40 +08:00
getHours Initial commit 2025-06-13 14:04:40 +08:00
getISODay Initial commit 2025-06-13 14:04:40 +08:00
getISOWeek Initial commit 2025-06-13 14:04:40 +08:00
getISOWeeksInYear Initial commit 2025-06-13 14:04:40 +08:00
getISOWeekYear Initial commit 2025-06-13 14:04:40 +08:00
getMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
getMinutes Initial commit 2025-06-13 14:04:40 +08:00
getMonth Initial commit 2025-06-13 14:04:40 +08:00
getOverlappingDaysInIntervals Initial commit 2025-06-13 14:04:40 +08:00
getQuarter Initial commit 2025-06-13 14:04:40 +08:00
getSeconds Initial commit 2025-06-13 14:04:40 +08:00
getTime Initial commit 2025-06-13 14:04:40 +08:00
getUnixTime Initial commit 2025-06-13 14:04:40 +08:00
getWeek Initial commit 2025-06-13 14:04:40 +08:00
getWeekOfMonth Initial commit 2025-06-13 14:04:40 +08:00
getWeeksInMonth Initial commit 2025-06-13 14:04:40 +08:00
getWeekYear Initial commit 2025-06-13 14:04:40 +08:00
getYear Initial commit 2025-06-13 14:04:40 +08:00
hoursToMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
hoursToMinutes Initial commit 2025-06-13 14:04:40 +08:00
hoursToSeconds Initial commit 2025-06-13 14:04:40 +08:00
intervalToDuration Initial commit 2025-06-13 14:04:40 +08:00
intlFormat Initial commit 2025-06-13 14:04:40 +08:00
intlFormatDistance Initial commit 2025-06-13 14:04:40 +08:00
isAfter Initial commit 2025-06-13 14:04:40 +08:00
isBefore Initial commit 2025-06-13 14:04:40 +08:00
isDate Initial commit 2025-06-13 14:04:40 +08:00
isEqual Initial commit 2025-06-13 14:04:40 +08:00
isExists Initial commit 2025-06-13 14:04:40 +08:00
isFirstDayOfMonth Initial commit 2025-06-13 14:04:40 +08:00
isFriday Initial commit 2025-06-13 14:04:40 +08:00
isFuture Initial commit 2025-06-13 14:04:40 +08:00
isLastDayOfMonth Initial commit 2025-06-13 14:04:40 +08:00
isLeapYear Initial commit 2025-06-13 14:04:40 +08:00
isMatch Initial commit 2025-06-13 14:04:40 +08:00
isMonday Initial commit 2025-06-13 14:04:40 +08:00
isPast Initial commit 2025-06-13 14:04:40 +08:00
isSameDay Initial commit 2025-06-13 14:04:40 +08:00
isSameHour Initial commit 2025-06-13 14:04:40 +08:00
isSameISOWeek Initial commit 2025-06-13 14:04:40 +08:00
isSameISOWeekYear Initial commit 2025-06-13 14:04:40 +08:00
isSameMinute Initial commit 2025-06-13 14:04:40 +08:00
isSameMonth Initial commit 2025-06-13 14:04:40 +08:00
isSameQuarter Initial commit 2025-06-13 14:04:40 +08:00
isSameSecond Initial commit 2025-06-13 14:04:40 +08:00
isSameWeek Initial commit 2025-06-13 14:04:40 +08:00
isSameYear Initial commit 2025-06-13 14:04:40 +08:00
isSaturday Initial commit 2025-06-13 14:04:40 +08:00
isSunday Initial commit 2025-06-13 14:04:40 +08:00
isThisHour Initial commit 2025-06-13 14:04:40 +08:00
isThisISOWeek Initial commit 2025-06-13 14:04:40 +08:00
isThisMinute Initial commit 2025-06-13 14:04:40 +08:00
isThisMonth Initial commit 2025-06-13 14:04:40 +08:00
isThisQuarter Initial commit 2025-06-13 14:04:40 +08:00
isThisSecond Initial commit 2025-06-13 14:04:40 +08:00
isThisWeek Initial commit 2025-06-13 14:04:40 +08:00
isThisYear Initial commit 2025-06-13 14:04:40 +08:00
isThursday Initial commit 2025-06-13 14:04:40 +08:00
isToday Initial commit 2025-06-13 14:04:40 +08:00
isTomorrow Initial commit 2025-06-13 14:04:40 +08:00
isTuesday Initial commit 2025-06-13 14:04:40 +08:00
isValid Initial commit 2025-06-13 14:04:40 +08:00
isWednesday Initial commit 2025-06-13 14:04:40 +08:00
isWeekend Initial commit 2025-06-13 14:04:40 +08:00
isWithinInterval Initial commit 2025-06-13 14:04:40 +08:00
isYesterday Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfDecade Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfISOWeek Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfISOWeekYear Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfMonth Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfQuarter Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfWeek Initial commit 2025-06-13 14:04:40 +08:00
lastDayOfYear Initial commit 2025-06-13 14:04:40 +08:00
lightFormat Initial commit 2025-06-13 14:04:40 +08:00
locale Initial commit 2025-06-13 14:04:40 +08:00
max Initial commit 2025-06-13 14:04:40 +08:00
milliseconds Initial commit 2025-06-13 14:04:40 +08:00
millisecondsToHours Initial commit 2025-06-13 14:04:40 +08:00
millisecondsToMinutes Initial commit 2025-06-13 14:04:40 +08:00
millisecondsToSeconds Initial commit 2025-06-13 14:04:40 +08:00
min Initial commit 2025-06-13 14:04:40 +08:00
minutesToHours Initial commit 2025-06-13 14:04:40 +08:00
minutesToMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
minutesToSeconds Initial commit 2025-06-13 14:04:40 +08:00
monthsToQuarters Initial commit 2025-06-13 14:04:40 +08:00
monthsToYears Initial commit 2025-06-13 14:04:40 +08:00
nextDay Initial commit 2025-06-13 14:04:40 +08:00
nextFriday Initial commit 2025-06-13 14:04:40 +08:00
nextMonday Initial commit 2025-06-13 14:04:40 +08:00
nextSaturday Initial commit 2025-06-13 14:04:40 +08:00
nextSunday Initial commit 2025-06-13 14:04:40 +08:00
nextThursday Initial commit 2025-06-13 14:04:40 +08:00
nextTuesday Initial commit 2025-06-13 14:04:40 +08:00
nextWednesday Initial commit 2025-06-13 14:04:40 +08:00
parse Initial commit 2025-06-13 14:04:40 +08:00
parseISO Initial commit 2025-06-13 14:04:40 +08:00
parseJSON Initial commit 2025-06-13 14:04:40 +08:00
previousDay Initial commit 2025-06-13 14:04:40 +08:00
previousFriday Initial commit 2025-06-13 14:04:40 +08:00
previousMonday Initial commit 2025-06-13 14:04:40 +08:00
previousSaturday Initial commit 2025-06-13 14:04:40 +08:00
previousSunday Initial commit 2025-06-13 14:04:40 +08:00
previousThursday Initial commit 2025-06-13 14:04:40 +08:00
previousTuesday Initial commit 2025-06-13 14:04:40 +08:00
previousWednesday Initial commit 2025-06-13 14:04:40 +08:00
quartersToMonths Initial commit 2025-06-13 14:04:40 +08:00
quartersToYears Initial commit 2025-06-13 14:04:40 +08:00
roundToNearestMinutes Initial commit 2025-06-13 14:04:40 +08:00
secondsToHours Initial commit 2025-06-13 14:04:40 +08:00
secondsToMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
secondsToMinutes Initial commit 2025-06-13 14:04:40 +08:00
set Initial commit 2025-06-13 14:04:40 +08:00
setDate Initial commit 2025-06-13 14:04:40 +08:00
setDay Initial commit 2025-06-13 14:04:40 +08:00
setDayOfYear Initial commit 2025-06-13 14:04:40 +08:00
setDefaultOptions Initial commit 2025-06-13 14:04:40 +08:00
setHours Initial commit 2025-06-13 14:04:40 +08:00
setISODay Initial commit 2025-06-13 14:04:40 +08:00
setISOWeek Initial commit 2025-06-13 14:04:40 +08:00
setISOWeekYear Initial commit 2025-06-13 14:04:40 +08:00
setMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
setMinutes Initial commit 2025-06-13 14:04:40 +08:00
setMonth Initial commit 2025-06-13 14:04:40 +08:00
setQuarter Initial commit 2025-06-13 14:04:40 +08:00
setSeconds Initial commit 2025-06-13 14:04:40 +08:00
setWeek Initial commit 2025-06-13 14:04:40 +08:00
setWeekYear Initial commit 2025-06-13 14:04:40 +08:00
setYear Initial commit 2025-06-13 14:04:40 +08:00
startOfDay Initial commit 2025-06-13 14:04:40 +08:00
startOfDecade Initial commit 2025-06-13 14:04:40 +08:00
startOfHour Initial commit 2025-06-13 14:04:40 +08:00
startOfISOWeek Initial commit 2025-06-13 14:04:40 +08:00
startOfISOWeekYear Initial commit 2025-06-13 14:04:40 +08:00
startOfMinute Initial commit 2025-06-13 14:04:40 +08:00
startOfMonth Initial commit 2025-06-13 14:04:40 +08:00
startOfQuarter Initial commit 2025-06-13 14:04:40 +08:00
startOfSecond Initial commit 2025-06-13 14:04:40 +08:00
startOfToday Initial commit 2025-06-13 14:04:40 +08:00
startOfTomorrow Initial commit 2025-06-13 14:04:40 +08:00
startOfWeek Initial commit 2025-06-13 14:04:40 +08:00
startOfWeekYear Initial commit 2025-06-13 14:04:40 +08:00
startOfYear Initial commit 2025-06-13 14:04:40 +08:00
startOfYesterday Initial commit 2025-06-13 14:04:40 +08:00
sub Initial commit 2025-06-13 14:04:40 +08:00
subBusinessDays Initial commit 2025-06-13 14:04:40 +08:00
subDays Initial commit 2025-06-13 14:04:40 +08:00
subHours Initial commit 2025-06-13 14:04:40 +08:00
subISOWeekYears Initial commit 2025-06-13 14:04:40 +08:00
subMilliseconds Initial commit 2025-06-13 14:04:40 +08:00
subMinutes Initial commit 2025-06-13 14:04:40 +08:00
subMonths Initial commit 2025-06-13 14:04:40 +08:00
subQuarters Initial commit 2025-06-13 14:04:40 +08:00
subSeconds Initial commit 2025-06-13 14:04:40 +08:00
subWeeks Initial commit 2025-06-13 14:04:40 +08:00
subYears Initial commit 2025-06-13 14:04:40 +08:00
toDate Initial commit 2025-06-13 14:04:40 +08:00
weeksToDays Initial commit 2025-06-13 14:04:40 +08:00
yearsToMonths Initial commit 2025-06-13 14:04:40 +08:00
yearsToQuarters Initial commit 2025-06-13 14:04:40 +08:00
CHANGELOG.md Initial commit 2025-06-13 14:04:40 +08:00
index.js Initial commit 2025-06-13 14:04:40 +08:00
index.js.flow Initial commit 2025-06-13 14:04:40 +08:00
LICENSE.md Initial commit 2025-06-13 14:04:40 +08:00
package.json Initial commit 2025-06-13 14:04:40 +08:00
README.md Initial commit 2025-06-13 14:04:40 +08:00
types.js Initial commit 2025-06-13 14:04:40 +08:00
typings.d.ts Initial commit 2025-06-13 14:04:40 +08:00

date-fns

date-fns provides the most comprehensive, yet simple and consistent toolset
for manipulating JavaScript dates in a browser & Node.js.


It's like Lodash for dates

  • It has 200+ functions for all occasions.
  • Modular: Pick what you need. Works with webpack, Browserify, or Rollup and also supports tree-shaking.
  • Native dates: Uses existing native type. It doesn't extend core objects for safety's sake.
  • Immutable & Pure: Built using pure functions and always returns a new date instance.
  • TypeScript & Flow: Supports both Flow and TypeScript
  • I18n: Dozens of locales. Include only what you need.
  • and many more benefits
import { compareAsc, format } from 'date-fns'

format(new Date(2014, 1, 11), 'yyyy-MM-dd')
//=> '2014-02-11'

const dates = [
  new Date(1995, 6, 2),
  new Date(1987, 1, 11),
  new Date(1989, 6, 10),
]
dates.sort(compareAsc)
//=> [
//   Wed Feb 11 1987 00:00:00,
//   Mon Jul 10 1989 00:00:00,
//   Sun Jul 02 1995 00:00:00
// ]

The library is available as an npm package. To install the package run:

npm install date-fns --save
# or with yarn
yarn add date-fns

Docs

See date-fns.org for more details, API, and other docs.


License

MIT © Sasha Koss