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

README.md

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