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

README.md

date-fns

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

[📖  Documentation](https://date-fns.org/docs/Getting-Started/)   |   [🧑‍💻  JavaScript Jobs](https://jobs.date-fns.org/)

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