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

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