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