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