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

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