From b763deb8cabf441ead8d90260e0d0627787c99e0 Mon Sep 17 00:00:00 2001 From: Lesha Koss Date: Wed, 8 Mar 2017 12:08:45 +0600 Subject: [PATCH] v2: arguments conversion (#452) * Add `dirty` prefix to uncleaned arguments * Convert `parse` arguments * Add missing properties to Options shared doc * Argument conversion in private functions * Add fallbacks to `parse` * Remove `toDate` fallback in `parse` * Make linter happy --- dist/date_fns_docs.json | 2 +- docs/Options.js | 4 + src/addDays/index.js.flow | 2 + src/addHours/index.js.flow | 2 + src/addISOYears/index.js.flow | 2 + src/addMilliseconds/index.js.flow | 2 + src/addMinutes/index.js.flow | 2 + src/addMonths/index.js.flow | 2 + src/addQuarters/index.js.flow | 2 + src/addSeconds/index.js.flow | 2 + src/addWeeks/index.js.flow | 2 + src/addYears/index.js.flow | 2 + src/areIntervalsOverlapping/index.js | 10 +-- src/areIntervalsOverlapping/index.js.flow | 2 + src/closestIndexTo/index.js | 6 +- src/closestIndexTo/index.js.flow | 2 + src/closestTo/index.js | 6 +- src/closestTo/index.js.flow | 2 + src/compareAsc/index.js | 6 +- src/compareAsc/index.js.flow | 2 + src/compareDesc/index.js | 6 +- src/compareDesc/index.js.flow | 2 + src/differenceInCalendarDays/index.js | 6 +- src/differenceInCalendarDays/index.js.flow | 2 + src/differenceInCalendarISOWeeks/index.js | 6 +- .../index.js.flow | 2 + src/differenceInCalendarISOYears/index.js | 4 +- .../index.js.flow | 2 + src/differenceInCalendarMonths/index.js | 6 +- src/differenceInCalendarMonths/index.js.flow | 2 + src/differenceInCalendarQuarters/index.js | 8 +- .../index.js.flow | 2 + src/differenceInCalendarWeeks/index.js.flow | 2 + src/differenceInCalendarYears/index.js | 6 +- src/differenceInCalendarYears/index.js.flow | 2 + src/differenceInDays/index.js | 12 +-- src/differenceInDays/index.js.flow | 2 + src/differenceInHours/index.js | 4 +- src/differenceInHours/index.js.flow | 2 + src/differenceInISOYears/index.js | 14 +-- src/differenceInISOYears/index.js.flow | 2 + src/differenceInMilliseconds/index.js | 6 +- src/differenceInMilliseconds/index.js.flow | 2 + src/differenceInMinutes/index.js | 4 +- src/differenceInMinutes/index.js.flow | 2 + src/differenceInMonths/index.js | 12 +-- src/differenceInMonths/index.js.flow | 2 + src/differenceInQuarters/index.js | 4 +- src/differenceInQuarters/index.js.flow | 2 + src/differenceInSeconds/index.js | 4 +- src/differenceInSeconds/index.js.flow | 2 + src/differenceInWeeks/index.js | 4 +- src/differenceInWeeks/index.js.flow | 2 + src/differenceInYears/index.js | 12 +-- src/differenceInYears/index.js.flow | 2 + src/distanceInWords/index.js.flow | 2 + src/distanceInWordsStrict/index.js.flow | 2 + src/eachDayOfInterval/index.js | 8 +- src/eachDayOfInterval/index.js.flow | 2 + src/endOfDay/index.js | 4 +- src/endOfDay/index.js.flow | 2 + src/endOfHour/index.js | 4 +- src/endOfHour/index.js.flow | 2 + src/endOfISOWeek/index.js | 4 +- src/endOfISOWeek/index.js.flow | 2 + src/endOfISOYear/index.js | 6 +- src/endOfISOYear/index.js.flow | 2 + src/endOfMinute/index.js | 4 +- src/endOfMinute/index.js.flow | 2 + src/endOfMonth/index.js | 4 +- src/endOfMonth/index.js.flow | 2 + src/endOfQuarter/index.js | 4 +- src/endOfQuarter/index.js.flow | 2 + src/endOfSecond/index.js | 4 +- src/endOfSecond/index.js.flow | 2 + src/endOfWeek/index.js.flow | 2 + src/endOfYear/index.js | 4 +- src/endOfYear/index.js.flow | 2 + src/format/_lib/addUTCMinutes/index.js | 5 +- src/format/_lib/addUTCMinutes/test.js | 7 +- src/format/_lib/getUTCDayOfYear/index.js | 4 +- src/format/_lib/getUTCDayOfYear/test.js | 2 +- src/format/_lib/getUTCISOWeek/index.js | 6 +- src/format/_lib/getUTCISOWeek/test.js | 2 +- src/format/_lib/getUTCISOYear/index.js | 8 +- src/format/_lib/getUTCISOYear/test.js | 2 +- src/format/_lib/startOfUTCISOWeek/index.js | 4 +- src/format/_lib/startOfUTCISOWeek/test.js | 2 +- src/format/_lib/startOfUTCISOYear/index.js | 6 +- src/format/_lib/startOfUTCISOYear/test.js | 2 +- src/format/index.js.flow | 2 + src/fp/addDays/index.js.flow | 2 + src/fp/addDaysWithOptions/index.js.flow | 2 + src/fp/addHours/index.js.flow | 2 + src/fp/addHoursWithOptions/index.js.flow | 2 + src/fp/addISOYears/index.js.flow | 2 + src/fp/addISOYearsWithOptions/index.js.flow | 2 + src/fp/addMilliseconds/index.js.flow | 2 + .../addMillisecondsWithOptions/index.js.flow | 2 + src/fp/addMinutes/index.js.flow | 2 + src/fp/addMinutesWithOptions/index.js.flow | 2 + src/fp/addMonths/index.js.flow | 2 + src/fp/addMonthsWithOptions/index.js.flow | 2 + src/fp/addQuarters/index.js.flow | 2 + src/fp/addQuartersWithOptions/index.js.flow | 2 + src/fp/addSeconds/index.js.flow | 2 + src/fp/addSecondsWithOptions/index.js.flow | 2 + src/fp/addWeeks/index.js.flow | 2 + src/fp/addWeeksWithOptions/index.js.flow | 2 + src/fp/addYears/index.js.flow | 2 + src/fp/addYearsWithOptions/index.js.flow | 2 + src/fp/areIntervalsOverlapping/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/closestIndexTo/index.js.flow | 2 + .../closestIndexToWithOptions/index.js.flow | 2 + src/fp/closestTo/index.js.flow | 2 + src/fp/closestToWithOptions/index.js.flow | 2 + src/fp/compareAsc/index.js.flow | 2 + src/fp/compareAscWithOptions/index.js.flow | 2 + src/fp/compareDesc/index.js.flow | 2 + src/fp/compareDescWithOptions/index.js.flow | 2 + src/fp/differenceInCalendarDays/index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + .../differenceInCalendarMonths/index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + .../differenceInCalendarWeeks/index.js.flow | 2 + .../index.js.flow | 2 + .../differenceInCalendarYears/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInDays/index.js.flow | 2 + .../differenceInDaysWithOptions/index.js.flow | 2 + src/fp/differenceInHours/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInISOYears/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInMilliseconds/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInMinutes/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInMonths/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInQuarters/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInSeconds/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInWeeks/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/differenceInYears/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/distanceInWords/index.js.flow | 2 + src/fp/distanceInWordsStrict/index.js.flow | 2 + .../index.js.flow | 2 + .../distanceInWordsWithOptions/index.js.flow | 2 + src/fp/eachDayOfInterval/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/endOfDay/index.js.flow | 2 + src/fp/endOfDayWithOptions/index.js.flow | 2 + src/fp/endOfHour/index.js.flow | 2 + src/fp/endOfHourWithOptions/index.js.flow | 2 + src/fp/endOfISOWeek/index.js.flow | 2 + src/fp/endOfISOWeekWithOptions/index.js.flow | 2 + src/fp/endOfISOYear/index.js.flow | 2 + src/fp/endOfISOYearWithOptions/index.js.flow | 2 + src/fp/endOfMinute/index.js.flow | 2 + src/fp/endOfMinuteWithOptions/index.js.flow | 2 + src/fp/endOfMonth/index.js.flow | 2 + src/fp/endOfMonthWithOptions/index.js.flow | 2 + src/fp/endOfQuarter/index.js.flow | 2 + src/fp/endOfQuarterWithOptions/index.js.flow | 2 + src/fp/endOfSecond/index.js.flow | 2 + src/fp/endOfSecondWithOptions/index.js.flow | 2 + src/fp/endOfWeek/index.js.flow | 2 + src/fp/endOfWeekWithOptions/index.js.flow | 2 + src/fp/endOfYear/index.js.flow | 2 + src/fp/endOfYearWithOptions/index.js.flow | 2 + src/fp/format/index.js.flow | 2 + src/fp/formatWithOptions/index.js.flow | 2 + src/fp/getDate/index.js.flow | 2 + src/fp/getDateWithOptions/index.js.flow | 2 + src/fp/getDay/index.js.flow | 2 + src/fp/getDayOfYear/index.js.flow | 2 + src/fp/getDayOfYearWithOptions/index.js.flow | 2 + src/fp/getDayWithOptions/index.js.flow | 2 + src/fp/getDaysInMonth/index.js.flow | 2 + .../getDaysInMonthWithOptions/index.js.flow | 2 + src/fp/getDaysInYear/index.js.flow | 2 + src/fp/getDaysInYearWithOptions/index.js.flow | 2 + src/fp/getHours/index.js.flow | 2 + src/fp/getHoursWithOptions/index.js.flow | 2 + src/fp/getISODay/index.js.flow | 2 + src/fp/getISODayWithOptions/index.js.flow | 2 + src/fp/getISOWeek/index.js.flow | 2 + src/fp/getISOWeekWithOptions/index.js.flow | 2 + src/fp/getISOWeeksInYear/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/getISOYear/index.js.flow | 2 + src/fp/getISOYearWithOptions/index.js.flow | 2 + src/fp/getMilliseconds/index.js.flow | 2 + .../getMillisecondsWithOptions/index.js.flow | 2 + src/fp/getMinutes/index.js.flow | 2 + src/fp/getMinutesWithOptions/index.js.flow | 2 + src/fp/getMonth/index.js.flow | 2 + src/fp/getMonthWithOptions/index.js.flow | 2 + .../index.js.flow | 2 + .../index.js.flow | 2 + src/fp/getQuarter/index.js.flow | 2 + src/fp/getQuarterWithOptions/index.js.flow | 2 + src/fp/getSeconds/index.js.flow | 2 + src/fp/getSecondsWithOptions/index.js.flow | 2 + src/fp/getTime/index.js.flow | 2 + src/fp/getTimeWithOptions/index.js.flow | 2 + src/fp/getYear/index.js.flow | 2 + src/fp/getYearWithOptions/index.js.flow | 2 + src/fp/isAfter/index.js.flow | 2 + src/fp/isAfterWithOptions/index.js.flow | 2 + src/fp/isBefore/index.js.flow | 2 + src/fp/isBeforeWithOptions/index.js.flow | 2 + src/fp/isDate/index.js.flow | 2 + src/fp/isDateWithOptions/index.js.flow | 2 + src/fp/isEqual/index.js.flow | 2 + src/fp/isEqualWithOptions/index.js.flow | 2 + src/fp/isFirstDayOfMonth/index.js.flow | 2 + .../index.js.flow | 2 + src/fp/isFriday/index.js.flow | 2 + src/fp/isFridayWithOptions/index.js.flow | 2 + src/fp/isLastDayOfMonth/index.js.flow | 2 + .../isLastDayOfMonthWithOptions/index.js.flow | 2 + src/fp/isLeapYear/index.js.flow | 2 + src/fp/isLeapYearWithOptions/index.js.flow | 2 + src/fp/isMonday/index.js.flow | 2 + src/fp/isMondayWithOptions/index.js.flow | 2 + src/fp/isSameDay/index.js.flow | 2 + src/fp/isSameDayWithOptions/index.js.flow | 2 + src/fp/isSameHour/index.js.flow | 2 + src/fp/isSameHourWithOptions/index.js.flow | 2 + src/fp/isSameISOWeek/index.js.flow | 2 + src/fp/isSameISOWeekWithOptions/index.js.flow | 2 + src/fp/isSameISOYear/index.js.flow | 2 + src/fp/isSameISOYearWithOptions/index.js.flow | 2 + src/fp/isSameMinute/index.js.flow | 2 + src/fp/isSameMinuteWithOptions/index.js.flow | 2 + src/fp/isSameMonth/index.js.flow | 2 + src/fp/isSameMonthWithOptions/index.js.flow | 2 + src/fp/isSameQuarter/index.js.flow | 2 + src/fp/isSameQuarterWithOptions/index.js.flow | 2 + src/fp/isSameSecond/index.js.flow | 2 + src/fp/isSameSecondWithOptions/index.js.flow | 2 + src/fp/isSameWeek/index.js.flow | 2 + src/fp/isSameWeekWithOptions/index.js.flow | 2 + src/fp/isSameYear/index.js.flow | 2 + src/fp/isSameYearWithOptions/index.js.flow | 2 + src/fp/isSaturday/index.js.flow | 2 + src/fp/isSaturdayWithOptions/index.js.flow | 2 + src/fp/isSunday/index.js.flow | 2 + src/fp/isSundayWithOptions/index.js.flow | 2 + src/fp/isThursday/index.js.flow | 2 + src/fp/isThursdayWithOptions/index.js.flow | 2 + src/fp/isTuesday/index.js.flow | 2 + src/fp/isTuesdayWithOptions/index.js.flow | 2 + src/fp/isValid/index.js.flow | 2 + src/fp/isValidWithOptions/index.js.flow | 2 + src/fp/isWednesday/index.js.flow | 2 + src/fp/isWednesdayWithOptions/index.js.flow | 2 + src/fp/isWeekend/index.js.flow | 2 + src/fp/isWeekendWithOptions/index.js.flow | 2 + src/fp/isWithinInterval/index.js.flow | 2 + .../isWithinIntervalWithOptions/index.js.flow | 2 + src/fp/lastDayOfISOWeek/index.js.flow | 2 + .../lastDayOfISOWeekWithOptions/index.js.flow | 2 + src/fp/lastDayOfISOYear/index.js.flow | 2 + .../lastDayOfISOYearWithOptions/index.js.flow | 2 + src/fp/lastDayOfMonth/index.js.flow | 2 + .../lastDayOfMonthWithOptions/index.js.flow | 2 + src/fp/lastDayOfQuarter/index.js.flow | 2 + .../lastDayOfQuarterWithOptions/index.js.flow | 2 + src/fp/lastDayOfWeek/index.js.flow | 2 + src/fp/lastDayOfWeekWithOptions/index.js.flow | 2 + src/fp/lastDayOfYear/index.js.flow | 2 + src/fp/lastDayOfYearWithOptions/index.js.flow | 2 + src/fp/max/index.js.flow | 2 + src/fp/maxWithOptions/index.js.flow | 2 + src/fp/min/index.js.flow | 2 + src/fp/minWithOptions/index.js.flow | 2 + src/fp/parse/index.js.flow | 2 + src/fp/parseWithOptions/index.js.flow | 2 + src/fp/setDate/index.js.flow | 2 + src/fp/setDateWithOptions/index.js.flow | 2 + src/fp/setDay/index.js.flow | 2 + src/fp/setDayOfYear/index.js.flow | 2 + src/fp/setDayOfYearWithOptions/index.js.flow | 2 + src/fp/setDayWithOptions/index.js.flow | 2 + src/fp/setHours/index.js.flow | 2 + src/fp/setHoursWithOptions/index.js.flow | 2 + src/fp/setISODay/index.js.flow | 2 + src/fp/setISODayWithOptions/index.js.flow | 2 + src/fp/setISOWeek/index.js.flow | 2 + src/fp/setISOWeekWithOptions/index.js.flow | 2 + src/fp/setISOYear/index.js.flow | 2 + src/fp/setISOYearWithOptions/index.js.flow | 2 + src/fp/setMilliseconds/index.js.flow | 2 + .../setMillisecondsWithOptions/index.js.flow | 2 + src/fp/setMinutes/index.js.flow | 2 + src/fp/setMinutesWithOptions/index.js.flow | 2 + src/fp/setMonth/index.js.flow | 2 + src/fp/setMonthWithOptions/index.js.flow | 2 + src/fp/setQuarter/index.js.flow | 2 + src/fp/setQuarterWithOptions/index.js.flow | 2 + src/fp/setSeconds/index.js.flow | 2 + src/fp/setSecondsWithOptions/index.js.flow | 2 + src/fp/setYear/index.js.flow | 2 + src/fp/setYearWithOptions/index.js.flow | 2 + src/fp/startOfDay/index.js.flow | 2 + src/fp/startOfDayWithOptions/index.js.flow | 2 + src/fp/startOfHour/index.js.flow | 2 + src/fp/startOfHourWithOptions/index.js.flow | 2 + src/fp/startOfISOWeek/index.js.flow | 2 + .../startOfISOWeekWithOptions/index.js.flow | 2 + src/fp/startOfISOYear/index.js.flow | 2 + .../startOfISOYearWithOptions/index.js.flow | 2 + src/fp/startOfMinute/index.js.flow | 2 + src/fp/startOfMinuteWithOptions/index.js.flow | 2 + src/fp/startOfMonth/index.js.flow | 2 + src/fp/startOfMonthWithOptions/index.js.flow | 2 + src/fp/startOfQuarter/index.js.flow | 2 + .../startOfQuarterWithOptions/index.js.flow | 2 + src/fp/startOfSecond/index.js.flow | 2 + src/fp/startOfSecondWithOptions/index.js.flow | 2 + src/fp/startOfWeek/index.js.flow | 2 + src/fp/startOfWeekWithOptions/index.js.flow | 2 + src/fp/startOfYear/index.js.flow | 2 + src/fp/startOfYearWithOptions/index.js.flow | 2 + src/fp/subDays/index.js.flow | 2 + src/fp/subDaysWithOptions/index.js.flow | 2 + src/fp/subHours/index.js.flow | 2 + src/fp/subHoursWithOptions/index.js.flow | 2 + src/fp/subISOYears/index.js.flow | 2 + src/fp/subISOYearsWithOptions/index.js.flow | 2 + src/fp/subMilliseconds/index.js.flow | 2 + .../subMillisecondsWithOptions/index.js.flow | 2 + src/fp/subMinutes/index.js.flow | 2 + src/fp/subMinutesWithOptions/index.js.flow | 2 + src/fp/subMonths/index.js.flow | 2 + src/fp/subMonthsWithOptions/index.js.flow | 2 + src/fp/subQuarters/index.js.flow | 2 + src/fp/subQuartersWithOptions/index.js.flow | 2 + src/fp/subSeconds/index.js.flow | 2 + src/fp/subSecondsWithOptions/index.js.flow | 2 + src/fp/subWeeks/index.js.flow | 2 + src/fp/subWeeksWithOptions/index.js.flow | 2 + src/fp/subYears/index.js.flow | 2 + src/fp/subYearsWithOptions/index.js.flow | 2 + src/fp/toDate/index.js.flow | 2 + src/fp/toDateWithOptions/index.js.flow | 2 + src/getDate/index.js | 4 +- src/getDate/index.js.flow | 2 + src/getDay/index.js | 4 +- src/getDay/index.js.flow | 2 + src/getDayOfYear/index.js | 6 +- src/getDayOfYear/index.js.flow | 2 + src/getDaysInMonth/index.js | 4 +- src/getDaysInMonth/index.js.flow | 2 + src/getDaysInYear/index.js | 4 +- src/getDaysInYear/index.js.flow | 2 + src/getHours/index.js | 4 +- src/getHours/index.js.flow | 2 + src/getISODay/index.js | 4 +- src/getISODay/index.js.flow | 2 + src/getISOWeek/index.js | 6 +- src/getISOWeek/index.js.flow | 2 + src/getISOWeeksInYear/index.js | 6 +- src/getISOWeeksInYear/index.js.flow | 2 + src/getISOYear/index.js | 8 +- src/getISOYear/index.js.flow | 2 + src/getMilliseconds/index.js | 4 +- src/getMilliseconds/index.js.flow | 2 + src/getMinutes/index.js | 4 +- src/getMinutes/index.js.flow | 2 + src/getMonth/index.js | 4 +- src/getMonth/index.js.flow | 2 + src/getOverlappingDaysInIntervals/index.js | 10 +-- .../index.js.flow | 2 + src/getQuarter/index.js | 4 +- src/getQuarter/index.js.flow | 2 + src/getSeconds/index.js | 4 +- src/getSeconds/index.js.flow | 2 + src/getTime/index.js | 4 +- src/getTime/index.js.flow | 2 + src/getYear/index.js | 4 +- src/getYear/index.js.flow | 2 + src/isAfter/index.js | 6 +- src/isAfter/index.js.flow | 2 + src/isBefore/index.js | 6 +- src/isBefore/index.js.flow | 2 + src/isDate/index.js.flow | 2 + src/isEqual/index.js | 6 +- src/isEqual/index.js.flow | 2 + src/isFirstDayOfMonth/index.js | 4 +- src/isFirstDayOfMonth/index.js.flow | 2 + src/isFriday/index.js | 4 +- src/isFriday/index.js.flow | 2 + src/isLastDayOfMonth/index.js | 6 +- src/isLastDayOfMonth/index.js.flow | 2 + src/isLeapYear/index.js | 4 +- src/isLeapYear/index.js.flow | 2 + src/isMonday/index.js | 4 +- src/isMonday/index.js.flow | 2 + src/isSameDay/index.js | 6 +- src/isSameDay/index.js.flow | 2 + src/isSameHour/index.js | 6 +- src/isSameHour/index.js.flow | 2 + src/isSameISOWeek/index.js | 4 +- src/isSameISOWeek/index.js.flow | 2 + src/isSameISOYear/index.js | 6 +- src/isSameISOYear/index.js.flow | 2 + src/isSameMinute/index.js | 6 +- src/isSameMinute/index.js.flow | 2 + src/isSameMonth/index.js | 6 +- src/isSameMonth/index.js.flow | 2 + src/isSameQuarter/index.js | 6 +- src/isSameQuarter/index.js.flow | 2 + src/isSameSecond/index.js | 6 +- src/isSameSecond/index.js.flow | 2 + src/isSameWeek/index.js.flow | 2 + src/isSameYear/index.js | 6 +- src/isSameYear/index.js.flow | 2 + src/isSaturday/index.js | 4 +- src/isSaturday/index.js.flow | 2 + src/isSunday/index.js | 4 +- src/isSunday/index.js.flow | 2 + src/isThursday/index.js | 4 +- src/isThursday/index.js.flow | 2 + src/isTuesday/index.js | 4 +- src/isTuesday/index.js.flow | 2 + src/isValid/index.js.flow | 2 + src/isWednesday/index.js | 4 +- src/isWednesday/index.js.flow | 2 + src/isWeekend/index.js | 4 +- src/isWeekend/index.js.flow | 2 + src/isWithinInterval/index.js | 8 +- src/isWithinInterval/index.js.flow | 2 + src/lastDayOfISOWeek/index.js | 4 +- src/lastDayOfISOWeek/index.js.flow | 2 + src/lastDayOfISOYear/index.js | 6 +- src/lastDayOfISOYear/index.js.flow | 2 + src/lastDayOfMonth/index.js | 4 +- src/lastDayOfMonth/index.js.flow | 2 + src/lastDayOfQuarter/index.js | 4 +- src/lastDayOfQuarter/index.js.flow | 2 + src/lastDayOfWeek/index.js.flow | 2 + src/lastDayOfYear/index.js | 4 +- src/lastDayOfYear/index.js.flow | 2 + src/max/index.js | 4 +- src/max/index.js.flow | 2 + src/min/index.js | 4 +- src/min/index.js.flow | 2 + src/parse/_lib/getUTCISOWeek/index.js | 6 +- src/parse/_lib/getUTCISOWeek/test.js | 2 +- src/parse/_lib/getUTCISOYear/index.js | 8 +- src/parse/_lib/getUTCISOYear/test.js | 2 +- src/parse/_lib/setUTCDay/index.js | 8 +- src/parse/_lib/setUTCDay/test.js | 12 ++- src/parse/_lib/setUTCISODay/index.js | 6 +- src/parse/_lib/setUTCISODay/test.js | 7 +- src/parse/_lib/setUTCISOWeek/index.js | 7 +- src/parse/_lib/setUTCISOWeek/test.js | 7 +- src/parse/_lib/setUTCISOYear/index.js | 9 +- src/parse/_lib/setUTCISOYear/test.js | 7 +- src/parse/_lib/startOfUTCISOWeek/index.js | 4 +- src/parse/_lib/startOfUTCISOWeek/test.js | 2 +- src/parse/_lib/startOfUTCISOYear/index.js | 6 +- src/parse/_lib/startOfUTCISOYear/test.js | 2 +- src/parse/index.js | 24 ++++-- src/parse/index.js.flow | 2 + src/parse/test.js | 86 +++++++++++++++++++ src/setDate/index.js.flow | 2 + src/setDay/index.js.flow | 2 + src/setDayOfYear/index.js.flow | 2 + src/setHours/index.js.flow | 2 + src/setISODay/index.js.flow | 2 + src/setISOWeek/index.js.flow | 2 + src/setISOYear/index.js.flow | 2 + src/setMilliseconds/index.js.flow | 2 + src/setMinutes/index.js.flow | 2 + src/setMonth/index.js.flow | 2 + src/setQuarter/index.js.flow | 2 + src/setSeconds/index.js.flow | 2 + src/setYear/index.js.flow | 2 + src/startOfDay/index.js | 4 +- src/startOfDay/index.js.flow | 2 + src/startOfHour/index.js | 4 +- src/startOfHour/index.js.flow | 2 + src/startOfISOWeek/index.js | 4 +- src/startOfISOWeek/index.js.flow | 2 + src/startOfISOYear/index.js | 6 +- src/startOfISOYear/index.js.flow | 2 + src/startOfMinute/index.js | 4 +- src/startOfMinute/index.js.flow | 2 + src/startOfMonth/index.js | 4 +- src/startOfMonth/index.js.flow | 2 + src/startOfQuarter/index.js | 4 +- src/startOfQuarter/index.js.flow | 2 + src/startOfSecond/index.js | 4 +- src/startOfSecond/index.js.flow | 2 + src/startOfWeek/index.js.flow | 2 + src/startOfYear/index.js | 4 +- src/startOfYear/index.js.flow | 2 + src/subDays/index.js.flow | 2 + src/subHours/index.js.flow | 2 + src/subISOYears/index.js.flow | 2 + src/subMilliseconds/index.js.flow | 2 + src/subMinutes/index.js.flow | 2 + src/subMonths/index.js.flow | 2 + src/subQuarters/index.js.flow | 2 + src/subSeconds/index.js.flow | 2 + src/subWeeks/index.js.flow | 2 + src/subYears/index.js.flow | 2 + src/toDate/index.js.flow | 2 + typings.d.ts | 2 + 524 files changed, 1241 insertions(+), 298 deletions(-) diff --git a/dist/date_fns_docs.json b/dist/date_fns_docs.json index 6e9f971c31..96e7b6c3f1 100644 --- a/dist/date_fns_docs.json +++ b/dist/date_fns_docs.json @@ -1 +1 @@ -{"General":[{"content":"# Getting Started\n\n## Table of Contents\n\n- [Introduction](#introduction)\n\n- [Installation](#installation)\n\n - [npm or yarn](#npm)\n\n - [Bower](#bower)\n\n - [CDN & Download](#cdn)\n\n - [GitHub Releases](#github-releases)\n\n## Introduction\n\n**date-fns** provides the most comprehensive, yet simple and consistent toolset\nfor manipulating **JavaScript dates** in **a browser** & **Node.js**.\n\n**date-fns** is like [lodash](https://lodash.com) for dates. It has\n[**140+ functions** for all occasions](https://date-fns.org/docs/).\n\n```js\ndateFns.format(new Date(2014, 1, 11), 'MM/DD/YYYY')\n//=> '02/11/2014'\n\nvar dates = [new Date(1995, 6, 2), new Date(1987, 1, 11), new Date(1989, 6, 10)]\ndates.sort(dateFns.compareAsc)\n//=> [\n// Wed Feb 11 1987 00:00:00,\n// Mon Jul 10 1989 00:00:00,\n// Sun Jul 02 1995 00:00:00\n// ]\n```\n\n## Installation\n\nThe library is available as an [npm package](https://www.npmjs.com/package/date-fns),\na Bower package, and is also distributed through a [CDN](http://cdn.date-fns.org/).\n\n### npm\n\nTo install the npm package, run:\n\n```bash\nnpm install date-fns --save\n#or\nyarn add date-fns\n```\n\nTo start using:\n\n```js\nvar isToday = require('date-fns/is_today')\nisToday(new Date())\n//=> true\n```\n\n### Bower\n\nTo install the Bower package, run:\n\n```bash\nbower install date-fns\n```\n\nTo start using it, add the library to your build and access it\nvia `window.dateFns`:\n\n```js\ndateFns.isToday(new Date())\n//=> true\n```\n\n### CDN\n\nTo start using date-fns, simply add the following code into HTML:\n\n```html\n\n\n```\n\nReplace `VERSION` with a proper version number e.g. `v1.0.0`.\n\nSee the [full list](http://cdn.date-fns.org/) of resources available on the CDN:\n\n- `http://cdn.date-fns.org/VERSION/date_fns.js`\n- `http://cdn.date-fns.org/VERSION/date_fns.js.map`\n- `http://cdn.date-fns.org/VERSION/date_fns.min.js`\n- `http://cdn.date-fns.org/VERSION/date_fns.min.js.map`\n- `http://cdn.date-fns.org/VERSION/date_fns_docs.json`\n\n### GitHub Releases\n\ndate-fns is available via [the releases page](https://github.com/date-fns/date-fns/releases)\nwhere you can download the source code or individual files.\n","type":"markdown","urlId":"Getting-Started","category":"General","title":"Getting Started","description":"Introduction & installation instructions","path":"/Users/lesha/Work/date-fns/docs/getting_started.md"},{"content":"# Change Log\n\nAll notable changes to this project will be documented in this file.\nThis project adheres to [Semantic Versioning].\n\nThis change log follows the format documented in [Keep a CHANGELOG].\n\n[Semantic Versioning]: http://semver.org/\n[Keep a CHANGELOG]: http://keepachangelog.com/\n\n## [Unreleased]\n\n### Changed\n\n- **BREAKING**: min and max functions now accept an array of dates\nrather than spread arguments.\n\n ```javascript\n // Before v2.0.0\n var minDate = min(new Date(1989, 6 /* Jul */, 10), new Date(1987, 1 /* Feb */, 11))\n var maxDate = min(new Date(1989, 6 /* Jul */, 10), new Date(1987, 1 /* Feb */, 11))\n\n // v2.0.0 onward\n var minDate = min([new Date(1989, 6 /* Jul */, 10), new Date(1987, 1 /* Feb */, 11)])\n var maxDate = min([new Date(1989, 6 /* Jul */, 10), new Date(1987, 1 /* Feb */, 11)])\n ```\n\n- **BREAKING**: remove all functions that create the current date internally:\n\n - `distanceInWordsToNow`\n - `isFuture`\n - `isPast`\n - `endOfToday`\n - `endOfTomorrow`\n - `endOfYesterday`\n - `startOfToday`\n - `startOfTomorrow`\n - `startOfYesterday`\n - `isToday`\n - `isTomorrow`\n - `isYesterday`\n - `isThisSecond`\n - `isThisMinute`\n - `isThisHour`\n - `isThisWeek`\n - `isThisISOWeek`\n - `isThisMonth`\n - `isThisQuarter`\n - `isThisYear`\n - `isThisISOYear`\n\n These functions are not pure, cannot have FP-versions [#253](https://github.com/date-fns/date-fns/issues/253)\n and would add extra code for UTC-versions [#376](https://github.com/date-fns/date-fns/issues/376).\n\n See issue: [#377](https://github.com/date-fns/date-fns/issues/377)\n\n ```javascript\n // Before v2.0.0\n var result = endOfToday()\n\n // v2.0.0 onward\n var result = endOfDay(new Date())\n ```\n\n Upgrade guide:\n\n - `distanceInWordsToNow(date)` → `distanceInWords(new Date(), date)`\n - `isFuture(date)` → `isAfter(date, new Date())`\n - `isPast(date)` → `isBefore(date, new Date())`\n - `endOfToday()` → `endOfDay(new Date())`\n - `endOfTomorrow()` → `endOfDay(addDays(new Date(), 1))`\n - `endOfYesterday()` → `endOfDay(subDays(new Date(), 1))`\n - `startOfToday()` → `startOfDay(new Date())`\n - `startOfTomorrow()` → `startOfDay(addDays(new Date(), 1))`\n - `startOfYesterday()` → `startOfDay(subDays(new Date(), 1))`\n - `isToday(date)` → `isSameDay(new Date(), date)`\n - `isTomorrow(date)` → `isSameDay(date, addDays(new Date(), 1))`\n - `isYesterday(date)` → `isSameDay(date, subDays(new Date(), 1))`\n - `isThisSecond(date)` → `isSameSecond(date, new Date())`\n - `isThisMinute(date)` → `isSameMinute(date, new Date())`\n - `isThisHour(date)` → `isSameHour(date, new Date())`\n - `isThisWeek(date)` → `isSameWeek(date, new Date())`\n - `isThisISOWeek(date)` → `isSameISOWeek(date, new Date())`\n - `isThisMonth(date)` → `isSameMonth(date, new Date())`\n - `isThisQuarter(date)` → `isSameQuarter(date, new Date())`\n - `isThisYear(date)` → `isSameYear(date, new Date())`\n - `isThisISOYear(date)` → `isSameISOYear(date, new Date())`\n\n- **BREAKING**: make the second argument of `format` non-optional in favor of explicitness.\n\n ```javascript\n // Before v2.0.0\n format(new Date(2016, 0, 1))\n\n // v2.0.0 onward\n format(new Date(2016, 0, 1), 'YYYY-MM-DDTHH:mm:ss.SSSZ')\n ```\n\n- **BREAKING**: functions renamed:\n\n - `areRangesOverlapping` → `areIntervalsOverlapping`\n - `eachDay` → `eachDayOfInterval`\n - `getOverlappingDaysInRanges` → `getOverlappingDaysInIntervals`\n - `isWithinRange` → `isWithinInterval`\n\n This change was made to mirror the use of word \"interval\" in standard ISO 8601:2004 terminology:\n\n ```\n 2.1.3\n time interval\n part of the time axis limited by two instants\n ```\n\n Also these functions now accept an object with `start` and `end` properties\n instead of two arguments as an interval. All these functions, as before,\n throw an exception if the start of the interval is after its end.\n\n ```javascript\n // Before v2.0.0\n\n areRangesOverlapping(\n new Date(2014, 0, 10), new Date(2014, 0, 20),\n new Date(2014, 0, 17), new Date(2014, 0, 21)\n )\n\n eachDay(new Date(2014, 0, 10), new Date(2014, 0, 20))\n\n getOverlappingDaysInRanges(\n new Date(2014, 0, 10), new Date(2014, 0, 20),\n new Date(2014, 0, 17), new Date(2014, 0, 21)\n )\n\n isWithinRange(\n new Date(2014, 0, 3),\n new Date(2014, 0, 1), new Date(2014, 0, 7)\n )\n\n // v2.0.0 onward\n\n areIntervalsOverlapping(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n )\n\n eachDayOfInterval({start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)})\n\n getOverlappingDaysInIntervals(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n )\n\n isWithinInterval(\n new Date(2014, 0, 3),\n {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)}\n )\n ```\n\n- **BREAKING**: `parse` renamed to `toDate`,\n created a new function `parse` which parses a string using a provided format.\n\n ```javascript\n // Before v2.0.0\n parse('2016-01-01')\n\n // v2.0.0 onward\n toDate('2016-01-01')\n parse('2016-01-01', 'YYYY-MM-DD', new Date())\n ```\n\n- **BREAKING**: the first two arguments in all `differenceIn...` functions are swapped\n to make them consistent with `distanceInWords` and `distanceInWordsStrict` functions.\n Now, the first date argument must be earlier then the second for function to return the positive number.\n\n ```javascript\n // Before v2.0.0\n differenceInYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n )\n //=> -1\n\n // v2.0.0 onward\n differenceInYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n )\n //=> 1\n ```\n\n- **BREAKING**: now `format` throws an exception if the passed date is `Invalid Date`.\n\n ```javascript\n // Before v2.0.0\n var result = format(date, 'YYYY-MM-DD')\n if (result === 'Invalid Date') {\n // ...\n }\n\n // v2.0.0 onward\n try {\n var result = format(date, 'YYYY-MM-DD')\n // ...\n } catch (e) {\n // ...\n }\n ```\n\n- **BREAKING**: `format` now assumes that the provided locale uses UTC-versions of `Date` methods,\n e.g. `getUTCMonth` instead of `getMonth`. All included locales are converted.\n This change affects only those who uses custom locales.\n Except handling of locales, behavior of `format` hasn't changed,\n i.e. it still formats dates in the user timezone.\n\n ```javascript\n var weekdays = ['sundio', 'lundio', 'mardio', 'merkurdio', 'jovdio', 'venerdio', 'saturdio']\n\n var customLocale = {\n format: {\n formatters: {\n 'dddd': function (date) {\n // Before v2.0.0\n return weekdays[date.getDay()]\n\n // v2.0.0 onward\n return weekdays[date.getUTCDay()]\n }\n },\n formattingTokensRegExp: /(\\[[^[]*])|(\\\\)?(dddd|.)/g\n }\n }\n\n format('2017-01-01', 'dddd', {locale: customLocale}) //=> 'sundio'\n ```\n\n- **BREAKING**: now `closestTo` and `closestIndexTo` don't throw an exception\n when the second argument is not an instance of array.\n\n- Every function now has `options` as the last argument which is passed to all its dependencies\n for consistency and future features.\n See [docs/Options.js](https://github.com/date-fns/date-fns/blob/master/docs/Options.js)\n\n- Added support for [ECMAScript Modules](http://www.ecma-international.org/ecma-262/6.0/#sec-modules)\n via `'date-fns/esm'` subpackage.\n\n It allows usage with bundlers that support tree-shaking,\n like [rollup.js](http://rollupjs.org) and [webpack](https://webpack.js.org):\n\n ```javascript\n // Without tree-shaking:\n import format from 'date-fns/format'\n import parse from 'date-fns/parse'\n\n // With tree-shaking:\n import {format, parse} from 'date-fns/esm'\n ```\n\n Also, as `'date-fns/esm'` function submodules provide default export,\n they can be used with TypeScript to import functions in more idiomatic way:\n\n ```typescript\n // In TypeScript,\n import * as format from 'date-fns/format'\n\n // is same as:\n import format from 'date-fns/esm/format'\n ```\n\n## [1.28.0] - 2017-02-27\n\n### Added\n\n- [Romanian locale (ro)](https://github.com/date-fns/date-fns/pull/446)\n (thanks to Sergiu Munteanu [@jsergiu](https://github.com/jsergiu))\n\n### Fixed\n\n- All functions now convert all their arguments to the respective types.\n See PR: [#443](https://github.com/date-fns/date-fns/pull/443)\n\n- Fixes for ordinals (1er, 2, 3, …) in French locale.\n Thanks to [@fbonzon](https://github.com/fbonzon).\n See PR: [#449](https://github.com/date-fns/date-fns/pull/449)\n\n## [1.27.2] - 2017-02-01\n\n### Fixed\n\n- Various fixes for Dutch locale. See PR: [#416](https://github.com/date-fns/date-fns/pull/416).\n Thanks to Ruben Stolk [@rubenstolk](https://github.com/rubenstolk)\n\n## [1.27.1] - 2017-01-20\n\n### Fixed\n\n- Added generation of TypeScript locale sub-modules, allowing import of locales in TypeScript.\n\n## [1.27.0] - 2017-01-19\n\n### Added\n\n- [Macedonian locale (mk)](https://github.com/date-fns/date-fns/pull/398)\n (thanks to Petar Vlahu [@vlahupetar](https://github.com/vlahupetar))\n\n## [1.26.0] - 2017-01-15\n\n### Added\n\n- `getTime`\n\n### Fixed\n\n- Various fixes for Japanese locale. See PR: [395](https://github.com/date-fns/date-fns/pull/395).\n Thanks to Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts)\n\n## [1.25.0] - 2017-01-11\n\n### Added\n\n- [Bulgarian locale (bg)](https://github.com/date-fns/date-fns/pull/357)\n (thanks to Nikolay Stoynov [@arvigeus](https://github.com/arvigeus))\n\n- [Czech locale (cs)](https://github.com/date-fns/date-fns/pull/386)\n (thanks to David Rus [@davidrus](https://github.com/davidrus))\n\n## [1.24.0] - 2017-01-06\n\n### Added\n\n- [Modern Standard Arabic locale (ar)](https://github.com/date-fns/date-fns/pull/367)\n (thanks to Abdallah Hassan [@AbdallahAHO](https://github.com/AbdallahAHO))\n\n## [1.23.0] - 2017-01-05\n\n### Added\n\n- Auto generate TypeScript and flow typings from documentation on release.\n Thanks to [@mattlewis92](https://github.com/mattlewis92).\n See related PRs: [#355](https://github.com/date-fns/date-fns/pull/355),\n [#370](https://github.com/date-fns/date-fns/pull/370)\n\n- [Croatian locale (hr)](https://github.com/date-fns/date-fns/pull/365)\n (thanks to Matija Marohnić [@silvenon](https://github.com/silvenon))\n\n- [Thai locale (th)](https://github.com/date-fns/date-fns/pull/362)\n (thanks to Athiwat Hirunworawongkun [@athivvat](https://github.com/athivvat))\n\n- [Finnish locale (fi)](https://github.com/date-fns/date-fns/pull/361)\n (thanks to Pyry-Samuli Lahti [@Pyppe](https://github.com/Pyppe))\n\n## [1.22.0] - 2016-12-28\n\n### Added\n\n- [Icelandic locale (is)](https://github.com/date-fns/date-fns/pull/356)\n (thanks to Derek Blank [@derekblank](https://github.com/derekblank))\n\n## [1.21.1] - 2016-12-18\n\n### Fixed\n\n- Fix `isBefore` and `isAfter` documentation mistakes.\n\n## [1.21.0] - 2016-12-16\n\n### Added\n\n- [Filipino locale (fil)](https://github.com/date-fns/date-fns/pull/339)\n (thanks to Ian De La Cruz [@RIanDeLaCruz](https://github.com/RIanDeLaCruz))\n\n- [Danish locale (da)](https://github.com/date-fns/date-fns/pull/343)\n (kudos to Anders B. Hansen [@Andersbiha](https://github.com/Andersbiha))\n\n## [1.20.1] - 2016-12-14\n\n### Fixed\n\n- Fix documentation for `getOverlappingDaysInRanges`.\n\n## [1.20.0] - 2016-12-13\n\n### Added\n\n- `areRangesOverlapping` and `getOverlappingDaysInRanges`\n Thanks to Joanna T [@asia-t](https://github.com/asia-t).\n See PR: [#331](https://github.com/date-fns/date-fns/pull/331)\n\n## [1.19.0] - 2016-12-13\n\n### Added\n\n- [Greek locale (el)](https://github.com/date-fns/date-fns/pull/334)\n (kudos to Theodoros Orfanidis [@teoulas](https://github.com/teoulas))\n\n- [Slovak locale (sk)](https://github.com/date-fns/date-fns/pull/336)\n (kudos to Marek Suscak [@mareksuscak](https://github.com/mareksuscak))\n\n- Add yarn support.\n Thanks to Uladzimir Havenchyk [@havenchyk](https://github.com/havenchyk).\n See PR: [#288](https://github.com/date-fns/date-fns/pull/288)\n\n## [1.18.0] - 2016-12-12\n\n### Added\n\n- [Turkish locale (tr)](https://github.com/date-fns/date-fns/pull/329)\n (kudos to Alpcan Aydın [@alpcanaydin](https://github.com/alpcanaydin))\n\n- [Korean locale (ko)](https://github.com/date-fns/date-fns/pull/327)\n (thanks to Hong Chulju [@angdev](https://github.com/angdev))\n\n### Fixed\n\n- `SS` and `SSS` formats in `format` are now correctly displayed with leading zeros.\n Thanks to Paul Dijou [@pauldijou](https://github.com/pauldijou).\n See PR: [#330](https://github.com/date-fns/date-fns/pull/330)\n\n## [1.17.0] - 2016-12-10\n\n### Added\n\n- [Polish locale (pl)](https://github.com/date-fns/date-fns/pull/294)\n (thanks to Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks))\n\n- [Portuguese locale (pt)](https://github.com/date-fns/date-fns/pull/316)\n (thanks to Dário Freire [@dfreire](https://github.com/dfreire))\n\n- [Swedish locale (sv)](https://github.com/date-fns/date-fns/pull/311)\n (thanks to Johannes Ulén [@ejulen](https://github.com/ejulen))\n\n- [French locale (fr)](https://github.com/date-fns/date-fns/pull/281)\n (thanks to Jean Dupouy [@izeau](https://github.com/izeau))\n\n- Performance tests. See PR: [#289](https://github.com/date-fns/date-fns/pull/289)\n\n### Fixed\n\n- Fix TypeScript and flow typings for `isValid`.\n See PR: [#310](https://github.com/date-fns/date-fns/pull/310)\n\n- Fix incorrect locale tests that could potentially lead to `format` bugs.\n Kudos to Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks).\n See related PRs: [#312](https://github.com/date-fns/date-fns/pull/312),\n [#320](https://github.com/date-fns/date-fns/pull/320)\n\n- Minor language fixes in the documentation.\n Thanks to Vedad Šoše [@vedadsose](https://github.com/vedadsose) ([#314](https://github.com/date-fns/date-fns/pull/314))\n and Asia [@asia-t](https://github.com/asia-t) ([#318](https://github.com/date-fns/date-fns/pull/318))\n\n### Changed\n\n- `format` now returns `String('Invalid Date')` if the passed date is invalid.\n See PR: [#323](https://github.com/date-fns/date-fns/pull/323)\n\n- `distanceInWords`, `distanceInWordsToNow`, `distanceInWordsStrict` and `format` functions now\n check if the passed locale is valid, and fallback to English locale otherwise.\n See PR: [#321](https://github.com/date-fns/date-fns/pull/321)\n\n- *Internal*: use a loop instead of `Object.keys` in `buildFormattingTokensRegExp`\n to improve compatibility with older browsers.\n See PR: [#322](https://github.com/date-fns/date-fns/pull/322)\n\n## [1.16.0] - 2016-12-08\n\n### Added\n\n- [Italian locale (it)](https://github.com/date-fns/date-fns/pull/298)\n (thanks to Alberto Restifo [@albertorestifo](https://github.com/albertorestifo))\n\n- For German `buildDistanceInWordsLocale`, add nominative case translations (for distances without a suffix).\n Kudos to Asia [@asia-t](https://github.com/asia-t).\n See related PR: [#295](https://github.com/date-fns/date-fns/pull/295)\n\n## [1.15.1] - 2016-12-07\n\n### Fixed\n\n- Fixed TypeScript imports from individual modules.\n Thanks to [@mattlewis92](https://github.com/mattlewis92).\n See related PR: [#287](https://github.com/date-fns/date-fns/pull/287)\n\n## [1.15.0] - 2016-12-07\n\n### Added\n\n- [Indonesian locale (id)](https://github.com/date-fns/date-fns/pull/299)\n (thanks to Rahmat Budiharso [@rbudiharso](https://github.com/rbudiharso))\n\n- [Catalan locale (ca)](https://github.com/date-fns/date-fns/pull/300)\n (thanks to Guillermo Grau [@guigrpa](https://github.com/guigrpa))\n\n### Fixed\n\n- Fix some inaccuracies in Spanish locale.\n Kudos to [@guigrpa](https://github.com/guigrpa).\n See related PR: [#302](https://github.com/date-fns/date-fns/pull/302)\n\n## [1.14.1] - 2016-12-06\n\n### Fixed\n\n- Fixed broken test for Norwegian Bokmål locale.\n\n## [1.14.0] - 2016-12-06\n\n### Added\n\n- [Norwegian Bokmål locale (nb)](https://github.com/date-fns/date-fns/pull/291)\n (thanks to Hans-Kristian Koren [@Hanse](https://github.com/Hanse))\n\n## [1.13.0] - 2016-12-06\n\n### Added\n\n- [Chinese Traditional locale (zh_tw)](https://github.com/date-fns/date-fns/pull/283)\n (thanks to tonypai [@tpai](https://github.com/tpai)).\n\n- [Dutch language locale (nl)](https://github.com/date-fns/date-fns/pull/278)\n (kudos to Jorik Tangelder [@jtangelder](https://github.com/jtangelder))\n\n## [1.12.1] - 2016-12-05\n\n### Fixed\n\n- Added `distanceInWordsStrict` to the list of supported functions in I18n doc.\n\n## [1.12.0] - 2016-12-05\n\n### Added\n\n- [Spanish language locale (es)](https://github.com/date-fns/date-fns/pull/269)\n (thanks to Juan Angosto [@juanangosto](https://github.com/juanangosto)).\n\n### Fixed\n\n- Fix flow typings for some of the functions.\n See PR: [#273](https://github.com/date-fns/date-fns/pull/273)\n\n## [1.11.2] - 2016-11-28\n\n### Fixed\n\n- Bug in `parse` when it sometimes parses ISO week-numbering dates incorrectly.\n See PR: [#262](https://github.com/date-fns/date-fns/pull/262)\n\n- Bug in some functions which caused them to handle dates earlier than 100 AD incorrectly.\n See PR: [#263](https://github.com/date-fns/date-fns/pull/263)\n\n## [1.11.1] - 2016-11-24\n\n### Fixed\n\n- Include TypeScript typings with npm package.\n\n## [1.11.0] - 2016-11-23\n\n### Added\n\n- `distanceInWordsStrict`.\n Kudos to [@STRML](https://github.com/STRML).\n See related PR: [#254](https://github.com/date-fns/date-fns/pull/254)\n\n- [TypeScript](https://www.typescriptlang.org/) typings for all functions.\n Kudos to [@mattlewis92](https://github.com/mattlewis92).\n See related PR: [#255](https://github.com/date-fns/date-fns/pull/255)\n\n## [1.10.0] - 2016-11-01\n\n### Added\n\n- `parse` now can parse dates that are ISO 8601 centuries (e.g., `19` and `+0019`).\n\n ```javascript\n var result = parse('19')\n //=> Mon Jan 01 1900 00:00:00\n ```\n\n- In `parse`, added ability to specify the number of additional digits\n for extended year or century format (possible values are 0, 1 or 2; default is 2).\n\n ```javascript\n parse('+002016-11-01')\n parse('+02016-11-01', {additionalDigits: 1})\n parse('+2016-11-01', {additionalDigits: 0})\n ```\n\n## [1.9.0] - 2016-10-25\n\n### Added\n\n- Got index.js imports to work with SystemJS.\n\n## [1.8.1] - 2016-10-24\n\n### Fixed\n\n- Added Japanese and German language locales to the list in I18n doc.\n\n## [1.8.0] - 2016-10-23\n\n### Added\n\n- [Japanese language locale (ja)](https://github.com/date-fns/date-fns/pull/241)\n (thanks to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu) again!)\n\n- `getISODay`\n\n- `setISODay`\n\n## [1.7.0] - 2016-10-20\n\n### Added\n\n- [German language locale (de)](https://github.com/date-fns/date-fns/pull/237)\n (thanks to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)).\n\n## [1.6.0] - 2016-10-16\n\n### Added\n\n- [Chinese Simplified locale (zh_cn)](https://github.com/date-fns/date-fns/pull/235)\n (kudos to Changyu [@KingMario](https://github.com/KingMario) Geng).\n\n## [1.5.2] - 2016-10-13\n\n### Fixed\n\n- Incorrectly generated docs for `format`.\n\n- Fixed typo in I18n doc.\n\n## [1.5.1] - 2016-10-12\n\n### Fixed\n\n- A change log entry for [1.5.0] is added.\n\n## [1.5.0] - 2016-10-12\n\n### Added\n\n- [The initial I18n support](https://date-fns.org/docs/I18n)\n\n## [1.4.0] - 2016-10-09\n\n### Added\n\n- Basic [SystemJS](https://github.com/systemjs/systemjs) support.\n\n### Fixed\n\n- Fix incorrect behaviour of `YYYY` and `YY` for years prior to 1000:\n now `format(new Date('0001-01-01'), 'YYYY-MM-DD')` returns `0001-01-01`\n instead of `1-01-01`.\n\n## [1.3.0] - 2016-05-26\n\n### Added\n\n- `closestIndexTo`\n\n## [1.2.0] - 2016-05-23\n\n### Added\n\n- Add an ability to pass negative numbers to `setDay`.\n\n## [1.1.1] - 2016-05-19\n\n### Fixed\n\n- Fix [Flow](http://flowtype.org/) declarations for some of the functions.\n\n## [1.1.0] - 2016-05-19\n\n### Added\n\n- [Flow](http://flowtype.org/) declarations for each function\n in [the \".js.flow\" style](http://flowtype.org/docs/declarations.html#declaration-files).\n Kudos to [@JohnyDays](https://github.com/JohnyDays). See related PRs:\n\n - [#205](https://github.com/date-fns/date-fns/pull/205)\n\n - [#207](https://github.com/date-fns/date-fns/pull/207)\n\n## [1.0.0] - 2016-05-18\n\n### Fixed\n\n- `format` now returns the correct result for key `E`.\n\n- Prevent `startOf...`, `endOf...` and `lastDayOf...` functions\n to return dates with an incorrect time when the date is modifying\n into another time zone.\n\n- `parse` now parses years from 1 AD to 99 AD correctly.\n\n- Fix a bug in `getISOWeek` appearing because of a changing time zone\n (e.g., when the given date is in DST and the start of the ISO year is not).\n\n### Changed\n\n- **BREAKING**: all functions are moved to the root of the library, so they\n are now accessible with `require('date-fns/name_of_function')` or\n `import nameOfFunction from 'date-fns/name_of_function'`.\n\n ```javascript\n // Before v1.0.0\n var addMonths = require('date-fns/src/add_months')\n\n // v1.0.0 onward\n var addMonths = require('date-fns/add_months')\n ```\n\n- **BREAKING**: functions that had the last optional argument `weekStartsAt`\n (i.e. `endOfWeek`, `isSameWeek`, `lastDayOfWeek`, `setDay`, `startOfWeek`)\n now instead receive the object `options` with the property `options.weekStartsOn`\n as the last argument.\n\n ```javascript\n // Before v1.0.0\n var result = endOfWeek(new Date(2014, 8, 2), 1)\n\n // v1.0.0 onward\n var result = endOfWeek(new Date(2014, 8, 2), {weekStartsOn: 1})\n ```\n\n- **BREAKING**: remove the function `getTimeSinceMidnight` that was used inside\n the other functions.\n\n- **BREAKING**: `differenceInDays` now returns the number of full days instead\n of calendar days.\n\n- **BREAKING**: `eachDay` and `isWithinRange` now throw an exception\n when the given range boundaries are invalid.\n\n- Faster `isLeapYear`.\n\n- *Internal*: make the documentation more verbose.\n\n- *Internal*: convert the tests from Chai to power-assert allowing them\n to run against IE8.\n\n### Added\n\n- `addISOYears`\n\n- `closestTo`\n\n- `differenceInCalendarDays`\n\n- `differenceInCalendarISOWeeks`\n\n- `differenceInCalendarISOYears`\n\n- `differenceInCalendarMonths`\n\n- `differenceInCalendarQuarters`\n\n- `differenceInCalendarWeeks`\n\n- `differenceInCalendarYears`\n\n- `differenceInHours`\n\n- `differenceInISOYears`\n\n- `differenceInMilliseconds`\n\n- `differenceInMinutes`\n\n- `differenceInMonths`\n\n- `differenceInQuarters`\n\n- `differenceInSeconds`\n\n- `differenceInWeeks`\n\n- `differenceInYears`\n\n- `distanceInWords`\n\n- `distanceInWordsToNow`\n\n- `endOfISOWeek`\n\n- `endOfISOYear`\n\n- `endOfToday`\n\n- `endOfTomorrow`\n\n- `endOfYesterday`\n\n- `getDaysInYear`\n\n- `isDate`\n\n- `isFriday`\n\n- `isMonday`\n\n- `isSameISOWeek`\n\n- `isSameISOYear`\n\n- `isSaturday`\n\n- `isSunday`\n\n- `isThisHour`\n\n- `isThisISOWeek`\n\n- `isThisISOYear`\n\n- `isThisMinute`\n\n- `isThisMonth`\n\n- `isThisQuarter`\n\n- `isThisSecond`\n\n- `isThisWeek`\n\n- `isThisYear`\n\n- `isThursday`\n\n- `isTomorrow`\n\n- `isTuesday`\n\n- `isValid`\n\n- `isWednesday`\n\n- `isYesterday`\n\n- `lastDayOfISOWeek`\n\n- `lastDayOfISOYear`\n\n- `startOfISOWeek`\n\n- `startOfToday`\n\n- `startOfTomorrow`\n\n- `startOfYesterday`\n\n- `subISOYears`\n\n- Add `Qo`, `W`, `Wo`, `WW`, `GG`, `GGGG`, `Z`, `ZZ`, `X`, `x` keys to `format`.\n\n## [0.17.0] - 2015-09-29\n\n### Fixed\n\n- Fix a lot of bugs appearing when date is modifying into other time zone\n (e.g., when adding months and original date is in DST but new date is not).\n\n- Prevent instances of Date to lose milliseconds value when passed to.\n `parse` in IE10.\n\n### Changed\n\n- `setISOWeek` now keeps time from original date.\n\n- *Internal*: reuse `getDaysInMonth` inside of `addMonths`.\n\n### Added\n\n- `differenceInDays`\n\n- `getTimeSinceMidnight`\n\n- `format` now has new format key `aa`, which returns `a.m.`/`p.m.`\n as opposed to `a` that returns `am`/`pm`.\n\n- Complete UMD package (for Bower and CDN).\n\n## [0.16.0] - 2015-09-01\n\n### Changed\n\n- Use `parse` to clean date arguments in all functions.\n\n- `parse` now fallbacks to `new Date` when the argument\n is not an ISO formatted date.\n\n- *Internal*: reuse `getDaysInMonth` inside of `setMonth`.\n\n### Added\n\n- `addQuarters`\n\n- `addWeeks`\n\n- `endOfQuarter`\n\n- `getDate`\n\n- `getDay`\n\n- `getDaysInMonth`\n\n- `getHours`\n\n- `getISOWeeksInYear`\n\n- `getMilliseconds`\n\n- `getMinutes`\n\n- `getMonth`\n\n- `getSeconds`\n\n- `getYear`\n\n- `isLeapYear`\n\n- `isSameHour`\n\n- `isSameMinute`\n\n- `isSameQuarter`\n\n- `isSameSecond`\n\n- `lastDayOfQuarter`\n\n- `lastDayOfWeek`\n\n- `max`\n\n- `min`\n\n- `setDate`\n\n- `setDay`\n\n- `setHours`\n\n- `setMilliseconds`\n\n- `setMinutes`\n\n- `setSeconds`\n\n- `startOfQuarter`\n\n- `subQuarters`\n\n- `subWeeks`\n\n## [0.15.0] - 2015-08-26\n\n### Changed\n\n- `format` now returns `a.m.`/`p.m.` instead of `am`/`pm`.\n\n- `setMonth` now sets last day of month if original date was last day\n of longer month.\n\n- *Internal*: Fix code style according to ESLint.\n\n- *Internal*: Make tests run through all time zones.\n\n### Added\n\n- `getQuarter`\n\n- `setQuarter`\n\n- `getDayOfYear`\n\n- `setDayOfYear`\n\n- `isPast`\n\n- `addSeconds`\n\n- `subSeconds`\n\n- `startOfSecond`\n\n- `endOfSecond`\n\n- `startOfMinute`\n\n- `endOfMinute`\n\n- `addMilliseconds`\n\n- `subMilliseconds`\n\n- `endOfYear`\n\n- `addYears`\n\n- `subYears`\n\n- `lastDayOfYear`\n\n- `lastDayOfMonth`\n\n## [0.14.11] - 2015-08-21\n\n### Fixed\n\n- `format` now uses `parse` to avoid time zone bugs.\n\n### Changed\n\n- `setIsoWeek` now sets time to the start of the day.\n\n## [0.14.10] - 2015-07-29\n\n### Fixed\n\n- `format` now behaves correctly with 12:00 am.\n\n- `format` now behaves correctly with ordinal numbers.\n\n### Added\n\n- `compareAsc`\n\n- `compareDesc`\n\n- `addHours`\n\n- `subHours`\n\n- `isSameDay`\n\n- `parse`\n\n- `getISOYear`\n\n- `setISOYear`\n\n- `startOfISOYear`\n\n- `getISOWeek`\n\n- `setISOWeek`\n\n## [0.14.9] - 2015-01-14\n\n### Fixed\n\n- `addMonths` now correctly behaves with February\n (see [#18](https://github.com/js-fns/date-fns/pull/18)).\n\n## [0.14.8] - 2014-12-25\n\n### Fixed\n\n- `format` function now behaves correctly with `pm`/`am`.\n\n## [0.14.6] - 2014-12-04\n\n### Fixed\n\n- Fix broken Bower support.\n\n## [0.14.0] - 2014-11-05\n\n### Added\n\n- Bower package.\n\n## [0.13.0] - 2014-10-22\n\n### Added\n\n- `addMinutes`\n\n- `subMinutes`\n\n- `isEqual`\n\n- `isBefore`\n\n- `isAfter`\n\n## [0.12.1] - 2014-10-19\n\n### Fixed\n\n- Incorrect rounding in `DDD` formatter.\n\n## [0.12.0] - 2014-10-15\n\n### Added\n\n- `isSameYear`\n\n## [0.11.0] - 2014-10-15\n\n### Added\n\n- `isWithinRange`\n\n## [0.10.0] - 2014-10-13\n\n### Added\n\n- `format`\n\n- `startOfYear`\n\n## [0.9.0] - 2014-10-10\n\n### Changed\n\n- *Internal*: simplify `isWeekend`\n\n### Added\n\n- `isFuture`\n\n## [0.8.0] - 2014-10-09\n\n### Changed\n\n- *Internal*: reuse `addDays` inside of `subDays`.\n\n### Added\n\n- `addMonths`\n\n- `subMonths`\n\n- `setMonth`\n\n- `setYear`\n\n## [0.7.0] - 2014-10-08\n\n### Added\n\n- `isSameWeek`\n\n## [0.6.0] - 2014-10-07\n\n### Fixed\n\n- Inconsistent behavior of `endOfMonth`.\n\n### Added\n\n- `isFirstDayOfMonth`\n\n- `isLastDayOfMonth`\n\n- `isSameMonth`\n\n## [0.5.0] - 2014-10-07\n\n### Added\n\n- `addDays`\n\n- `subDays`\n\n## [0.4.0] - 2014-10-07\n\n### Added\n\n- `startOfWeek`\n\n- `endOfWeek`\n\n- `eachDay`\n\n## [0.3.0] - 2014-10-06\n\n### Changed\n\n- `startOfDay` now sets milliseconds as well.\n\n### Added\n\n- `endOfDay`\n\n- `startOfMonth`\n\n- `endOfMonth`\n\n## [0.2.0] - 2014-10-06\n\n### Added\n\n- `isToday`\n\n- `isWeekend`\n\n## 0.1.0 - 2014-10-06\n\n### Added\n\n- `startOfDay`\n\n[Unreleased]: https://github.com/date-fns/date-fns/compare/v1.28.0...HEAD\n[1.28.0]: https://github.com/date-fns/date-fns/compare/v1.27.2...v1.28.0\n[1.27.2]: https://github.com/date-fns/date-fns/compare/v1.27.1...v1.27.2\n[1.27.1]: https://github.com/date-fns/date-fns/compare/v1.27.0...v1.27.1\n[1.27.0]: https://github.com/date-fns/date-fns/compare/v1.26.0...v1.27.0\n[1.26.0]: https://github.com/date-fns/date-fns/compare/v1.25.0...v1.26.0\n[1.25.0]: https://github.com/date-fns/date-fns/compare/v1.24.0...v1.25.0\n[1.24.0]: https://github.com/date-fns/date-fns/compare/v1.23.0...v1.24.0\n[1.23.0]: https://github.com/date-fns/date-fns/compare/v1.22.0...v1.23.0\n[1.22.0]: https://github.com/date-fns/date-fns/compare/v1.21.1...v1.22.0\n[1.21.1]: https://github.com/date-fns/date-fns/compare/v1.21.0...v1.21.1\n[1.21.0]: https://github.com/date-fns/date-fns/compare/v1.20.1...v1.21.0\n[1.20.1]: https://github.com/date-fns/date-fns/compare/v1.20.0...v1.20.1\n[1.20.0]: https://github.com/date-fns/date-fns/compare/v1.19.0...v1.20.0\n[1.19.0]: https://github.com/date-fns/date-fns/compare/v1.18.0...v1.19.0\n[1.18.0]: https://github.com/date-fns/date-fns/compare/v1.17.0...v1.18.0\n[1.17.0]: https://github.com/date-fns/date-fns/compare/v1.16.0...v1.17.0\n[1.16.0]: https://github.com/date-fns/date-fns/compare/v1.15.1...v1.16.0\n[1.15.1]: https://github.com/date-fns/date-fns/compare/v1.15.0...v1.15.1\n[1.15.0]: https://github.com/date-fns/date-fns/compare/v1.14.1...v1.15.0\n[1.14.1]: https://github.com/date-fns/date-fns/compare/v1.14.0...v1.14.1\n[1.14.0]: https://github.com/date-fns/date-fns/compare/v1.13.0...v1.14.0\n[1.13.0]: https://github.com/date-fns/date-fns/compare/v1.12.1...v1.13.0\n[1.12.1]: https://github.com/date-fns/date-fns/compare/v1.12.0...v1.12.1\n[1.12.0]: https://github.com/date-fns/date-fns/compare/v1.11.2...v1.12.0\n[1.11.2]: https://github.com/date-fns/date-fns/compare/v1.11.1...v1.11.2\n[1.11.1]: https://github.com/date-fns/date-fns/compare/v1.11.0...v1.11.1\n[1.11.0]: https://github.com/date-fns/date-fns/compare/v1.10.0...v1.11.0\n[1.10.0]: https://github.com/date-fns/date-fns/compare/v1.9.0...v1.10.0\n[1.9.0]: https://github.com/date-fns/date-fns/compare/v1.8.1...v1.9.0\n[1.8.1]: https://github.com/date-fns/date-fns/compare/v1.8.0...v1.8.1\n[1.8.0]: https://github.com/date-fns/date-fns/compare/v1.7.0...v1.8.0\n[1.7.0]: https://github.com/date-fns/date-fns/compare/v1.6.0...v1.7.0\n[1.6.0]: https://github.com/date-fns/date-fns/compare/v1.5.2...v1.6.0\n[1.5.2]: https://github.com/date-fns/date-fns/compare/v1.5.1...v1.5.2\n[1.5.1]: https://github.com/date-fns/date-fns/compare/v1.5.0...v1.5.1\n[1.5.0]: https://github.com/date-fns/date-fns/compare/v1.4.0...v1.5.0\n[1.4.0]: https://github.com/date-fns/date-fns/compare/v1.3.0...v1.4.0\n[1.3.0]: https://github.com/date-fns/date-fns/compare/v1.2.0...v1.3.0\n[1.2.0]: https://github.com/date-fns/date-fns/compare/v1.1.1...v1.2.0\n[1.1.1]: https://github.com/date-fns/date-fns/compare/v1.1.0...v1.1.1\n[1.1.0]: https://github.com/date-fns/date-fns/compare/v1.0.0...v1.1.0\n[1.0.0]: https://github.com/date-fns/date-fns/compare/v0.17.0...v1.0.0\n[0.17.0]: https://github.com/date-fns/date-fns/compare/v0.16.0...v0.17.0\n[0.16.0]: https://github.com/date-fns/date-fns/compare/v0.15.0...v0.16.0\n[0.15.0]: https://github.com/date-fns/date-fns/compare/v0.14.11...v0.15.0\n[0.14.11]: https://github.com/date-fns/date-fns/compare/v0.14.10...v0.14.11\n[0.14.10]: https://github.com/date-fns/date-fns/compare/v0.14.9...v0.14.10\n[0.14.9]: https://github.com/date-fns/date-fns/compare/v0.14.8...v0.14.9\n[0.14.8]: https://github.com/date-fns/date-fns/compare/v0.14.6...v0.14.8\n[0.14.6]: https://github.com/date-fns/date-fns/compare/v0.14.0...v0.14.6\n[0.14.0]: https://github.com/date-fns/date-fns/compare/v0.13.0...v0.14.0\n[0.13.0]: https://github.com/date-fns/date-fns/compare/v0.12.1...v0.13.0\n[0.12.1]: https://github.com/date-fns/date-fns/compare/v0.12.0...v0.12.1\n[0.12.0]: https://github.com/date-fns/date-fns/compare/v0.11.0...v0.12.0\n[0.11.0]: https://github.com/date-fns/date-fns/compare/v0.10.0...v0.11.0\n[0.10.0]: https://github.com/date-fns/date-fns/compare/v0.9.0...v0.10.0\n[0.9.0]: https://github.com/date-fns/date-fns/compare/v0.8.0...v0.9.0\n[0.8.0]: https://github.com/date-fns/date-fns/compare/v0.7.0...v0.8.0\n[0.7.0]: https://github.com/date-fns/date-fns/compare/v0.6.0...v0.7.0\n[0.6.0]: https://github.com/date-fns/date-fns/compare/v0.5.0...v0.6.0\n[0.5.0]: https://github.com/date-fns/date-fns/compare/v0.4.0...v0.5.0\n[0.4.0]: https://github.com/date-fns/date-fns/compare/v0.3.0...v0.4.0\n[0.3.0]: https://github.com/date-fns/date-fns/compare/v0.2.0...v0.3.0\n[0.2.0]: https://github.com/date-fns/date-fns/compare/v0.1.0...v0.2.0\n","type":"markdown","urlId":"Change-Log","category":"General","title":"Change Log","description":"Changes for each version of the library","path":"/Users/lesha/Work/date-fns/CHANGELOG.md"},{"content":"# Contributing Guide\n\n## Table of Contents\n\n- [How to Help?](#how-to-help)\n\n- [Contribution Guidelines](#contribution-guidelines)\n\n- [Getting Started](#getting-started)\n\n- [Code Style Guide](#code-style-guide)\n\n - [Lint the Code](#lint-the-code)\n\n - [Use EditorConfig](#use-editorconfig)\n\n- [Documentation](#documentation)\n\n - [JSDoc](#jsdoc)\n\n## How to Help?\n\nHelp is always welcome. There are areas where you can help:\n\n- The core functionality (performance improvements, bug fixes,\n new features, etc.).\n\n- Documentation ([markdown documents](https://github.com/date-fns/date-fns/search?l=markdown),\n inline JSDoc comments).\n\n- Test suite & development environment improvements.\n\n- The [website](https://github.com/date-fns/date-fns.org).\n\nIf you see a gap, but don't have time, experience, or you just need help\nwith the library, don't hesitate to [shoot an issue](https://github.com/date-fns/date-fns/issues/new).\n\nThe date-fns functionality is comprehensive and covers most of the use cases,\nhowever it doesn't have extended time zone support. Please leave a comment\nto the [Extended time zones support issue](https://github.com/date-fns/date-fns/issues/180)\nif you are interested in the functionality or want to help with development.\n\nIf you are interested in Elm/ClojureScript/etc. wrappers,\nplease [file an issue](https://github.com/date-fns/date-fns/issues/new).\n\n## Contribution Guidelines\n\nDue to the modular nature of date-fns, it's more than open to new features.\nHowever, when a new function duplicates the existing functionality, native API\nor causes significant build size increase, a PR might be rejected or\nthe author can be asked to move the code to a new or another package.\n\nPlease follow the main contributing rules, to maintain date-fns' top quality:\n\n- Follow style guides:\n\n - [Lint the code](#lint-the-code).\n\n - [Use EditorConfig](#use-editorconfig).\n\n- Write tests.\n\n- [Write documentation](#documentation).\n\n- [Write good commit messages].\n\n- Add an entry to Unreleased section in [CHANGELOG].\n\n- Squash related commits before a PR merge.\n\n- Don't change the library version.\n\n[Write good commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html\n[CHANGELOG]: https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md\n\n## Getting Started\n\n1. [Install Node.js](https://nodejs.org/en/download).\n\n2. Fork the project and clone the fork repo.\n\n3. Run `yarn` or `npm install` to install the application dependencies.\n\n## Code Style Guide\n\n### Lint the Code\n\nThe project follows [JavaScript Standard Style]. To lint the code, run:\n\n```bash\nnpm run lint\n# or\nyarn run lint\n```\n\n[JavaScript Standard Style]: http://standardjs.com/\n\n### Use EditorConfig\n\nThe project uses [EditorConfig] to define basic coding style guides.\nPlease install a plugin for your editor of choice or manually enforce\nthe rules listed in [.editorconfig].\n\n[EditorConfig]: http://editorconfig.org\n[.editorconfig]: https://github.com/date-fns/date-fns.org/blob/master/.editorconfig\n\n## Documentation\n\n### JSDoc\n\n[JSDoc](http://usejsdoc.org) is used for the code documentation. Along with\nstandard JSDoc tags, date-fns uses `@category` tag that allows\nto group functions.\n\n[jsdoc-parse](https://github.com/jsdoc2md/jsdoc-parse) is used to generate\n[documentation JSON](https://github.com/date-fns/date-fns/blob/master/dist/date_fns_docs.json)\nconsumed by [date-fns.org](https://date-fns.org/docs).\n","type":"markdown","urlId":"Contributing","category":"General","title":"Contributing","description":"Contribution manual","path":"/Users/lesha/Work/date-fns/CONTRIBUTING.md"},{"content":"# Internationalization\n\n## Table of Contents\n\n- [Usage](#usage)\n\n- [Supported Languages](#supported-languages)\n\n- [Adding New Language](#adding-new-language)\n\n## Usage\n\n**Important! Note that non-CommonJS packages (Bower, CDN)\ndon't support I18n yet.** Please [vote for the issue](https://github.com/date-fns/date-fns/issues/232)\nif you want to make it happen.\n\nThere are just a few functions that support I18n:\n\n- [`format`](https://date-fns.org/docs/format)\n- [`distanceInWords`](https://date-fns.org/docs/distanceInWords)\n- [`distanceInWordsToNow`](https://date-fns.org/docs/distanceInWordsToNow)\n- [`distanceInWordsStrict`](https://date-fns.org/docs/distanceInWordsStrict)\n\nTo use a locale, you need to require it and then pass\nas an option to a function:\n\n```js\nvar distanceInWords = require('date-fns/distance_in_words')\n// Require Esperanto locale\nvar eoLocale = require('date-fns/locale/eo')\n\nvar result = distanceInWords(\n new Date(2016, 7, 1),\n new Date(2015, 0, 1),\n {locale: eoLocale} // Pass the locale as an option\n)\n//=> 'pli ol 1 jaro'\n```\n\nIt might seem complicated to require and pass locales as options,\nbut unlike Moment.js which bloats your build with all the locales\nby default date-fns forces developer to manually require locales when needed.\nTo make API simple, we encourage you to write tiny wrappers and use those\ninstead of original functions:\n\n```js\n// app/_lib/format.js\n\nvar format = require('date-fns/format')\n\nvar locales = {\n en: require('date-fns/locale/en'),\n eo: require('date-fns/locale/eo'),\n ru: require('date-fns/locale/ru')\n}\n\nmodule.exports = function (date, formatStr) {\n return format(date, formatStr, {\n locale: locales[window.__localeId__] // or global.__localeId__\n })\n}\n\n// Later:\n\nvar format = require('app/_lib/format')\n\nwindow.__localeId__ = 'en'\nformat(friday13, 'dddd D')\n//=> 'Friday 13'\n\nwindow.__localeId__ = 'eo'\nformat(friday13, 'dddd D')\n//=> 'vendredo 13'\n```\n\n## Supported Languages\n\ndate-fns currently supports:\n\n1. [English](https://github.com/date-fns/date-fns/tree/master/src/locale/en)\n (`en`; it's the built-in language and doesn't require any setup)\n2. [Russian](https://github.com/date-fns/date-fns/tree/master/src/locale/ru) (`ru`)\n3. [Esperanto](https://github.com/date-fns/date-fns/tree/master/src/locale/eo) (`eo`)\n4. [Chinese Simplified](https://github.com/date-fns/date-fns/tree/master/src/locale/zh_cn)\n (`zh_cn`; kudos to Changyu Geng [@KingMario](https://github.com/KingMario))\n5. [German](https://github.com/date-fns/date-fns/tree/master/src/locale/de)\n (`de`; kudos to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)\n and Asia [@asia-t](https://github.com/asia-t))\n6. [Japanese](https://github.com/date-fns/date-fns/tree/master/src/locale/ja)\n (`ja`; kudos to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)\n and Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts))\n7. [Spanish](https://github.com/date-fns/date-fns/tree/master/src/locale/es)\n (`es`; kudos to Juan Angosto [@juanangosto](https://github.com/juanangosto)\n and Guillermo Grau [@guigrpa](https://github.com/guigrpa))\n8. [Dutch](https://github.com/date-fns/date-fns/tree/master/src/locale/nl)\n (`nl`; kudos to Jorik Tangelder [@jtangelder](https://github.com/jtangelder)\n and Ruben Stolk [@rubenstolk](https://github.com/rubenstolk))\n9. [Chinese Traditional](https://github.com/date-fns/date-fns/tree/master/src/locale/zh_tw)\n (`zh_tw`; kudos to tonypai [@tpai](https://github.com/tpai))\n10. [Norwegian Bokmål](https://github.com/date-fns/date-fns/tree/master/src/locale/nb)\n (`nb`; kudos to Hans-Kristian Koren [@Hanse](https://github.com/Hanse))\n11. [Catalan](https://github.com/date-fns/date-fns/tree/master/src/locale/ca)\n (`ca`; kudos to Guillermo Grau [@guigrpa](https://github.com/guigrpa))\n12. [Indonesian](https://github.com/date-fns/date-fns/tree/master/src/locale/id)\n (`id`; kudos to Rahmat Budiharso [@rbudiharso](https://github.com/rbudiharso))\n13. [Italian](https://github.com/date-fns/date-fns/tree/master/src/locale/it)\n (`it`; kudos to Alberto Restifo [@albertorestifo](https://github.com/albertorestifo))\n14. [Polish](https://github.com/date-fns/date-fns/tree/master/src/locale/pl)\n (`pl`; kudos to Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks))\n15. [Portuguese](https://github.com/date-fns/date-fns/tree/master/src/locale/pt)\n (`pt`; kudos to Dário Freire [@dfreire](https://github.com/dfreire))\n16. [Swedish](https://github.com/date-fns/date-fns/tree/master/src/locale/sv)\n (`sv`; kudos to Johannes Ulén [@ejulen](https://github.com/ejulen))\n17. [French](https://github.com/date-fns/date-fns/tree/master/src/locale/fr)\n (`fr`; kudos to Jean Dupouy [@izeau](https://github.com/izeau)\n and François B [@fbonzon](https://github.com/fbonzon))\n18. [Turkish](https://github.com/date-fns/date-fns/tree/master/src/locale/tr)\n (`tr`; kudos to Alpcan Aydın [@alpcanaydin](https://github.com/alpcanaydin))\n19. [Korean](https://github.com/date-fns/date-fns/tree/master/src/locale/ko)\n (`ko`; kudos to Hong Chulju [@angdev](https://github.com/angdev))\n20. [Greek](https://github.com/date-fns/date-fns/tree/master/src/locale/el)\n (`el`; kudos to Theodoros Orfanidis [@teoulas](https://github.com/teoulas))\n21. [Slovak](https://github.com/date-fns/date-fns/tree/master/src/locale/sk)\n (`sk`; kudos to Marek Suscak [@mareksuscak](https://github.com/mareksuscak))\n22. [Filipino](https://github.com/date-fns/date-fns/tree/master/src/locale/fil)\n (`fil`; kudos to Ian De La Cruz [@RIanDeLaCruz](https://github.com/RIanDeLaCruz))\n23. [Danish](https://github.com/date-fns/date-fns/tree/master/src/locale/da)\n (`da`; kudos to Anders B. Hansen [@Andersbiha](https://github.com/Andersbiha))\n24. [Icelandic](https://github.com/date-fns/date-fns/tree/master/src/locale/is)\n (`is`; kudos to Derek Blank [@derekblank](https://github.com/derekblank))\n25. [Finnish](https://github.com/date-fns/date-fns/tree/master/src/locale/fi)\n (`fi`; kudos to Pyry-Samuli Lahti [@Pyppe](https://github.com/Pyppe))\n26. [Thai](https://github.com/date-fns/date-fns/tree/master/src/locale/th)\n (`th`; kudos to Athiwat Hirunworawongkun [@athivvat](https://github.com/athivvat))\n27. [Croatian](https://github.com/date-fns/date-fns/tree/master/src/locale/hr)\n (`hr`; kudos to Matija Marohnić [@silvenon](https://github.com/silvenon))\n28. [Arabic](https://github.com/date-fns/date-fns/tree/master/src/locale/ar)\n (`ar`; kudos to Abdallah Hassan [@AbdallahAHO](https://github.com/AbdallahAHO))\n29. [Bulgarian](https://github.com/date-fns/date-fns/tree/master/src/locale/bg)\n (`bg`; kudos to Nikolay Stoynov [@arvigeus](https://github.com/arvigeus))\n30. [Czech](https://github.com/date-fns/date-fns/tree/master/src/locale/cs)\n (`cs`; kudos to David Rus [@davidrus](https://github.com/davidrus))\n31. [Macedonian](https://github.com/date-fns/date-fns/tree/master/src/locale/mk)\n (`mk`; kudos to Petar Vlahu [@vlahupetar](https://github.com/vlahupetar))\n32. [Romanian](https://github.com/date-fns/date-fns/tree/master/src/locale/ro)\n (`ro`; kudos to Sergiu Munteanu [@jsergiu](https://github.com/jsergiu))\n\nMore is coming, help is welcome!\n\n## Adding New Language\n\nAt the moment there is no definitive guide, so if you feel brave enough,\nuse this quick guide:\n\n- First of all, [create an issue](https://github.com/date-fns/date-fns/issues/new?title=XXX%20language%20support&labels[]=I18n)\n so you won't overlap with others.\n- Use [English locale](https://github.com/date-fns/date-fns/tree/master/src/locale/en)\n as the basis and then incrementally adjust the tests and the code.\n- If you have questions or need guidance, leave a comment in the issue.\n\nThank you for your support!\n","type":"markdown","urlId":"I18n","category":"General","title":"I18n","description":"Internationalization","path":"/Users/lesha/Work/date-fns/docs/i18n.md"},{"content":"# License\n\ndate-fns is licensed under the [MIT license](http://kossnocorp.mit-license.org).\nRead more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).\n","type":"markdown","urlId":"License","category":"General","title":"License","description":"MIT © Sasha Koss","path":"/Users/lesha/Work/date-fns/LICENSE.md"}],"Types":[{"type":"jsdoc","urlId":"Interval","category":"Types","title":"Interval","description":"An object that combines two dates to represent the time interval.","content":{"id":"Interval","longname":"Interval","name":"Interval","kind":"typedef","scope":"global","description":"An object that combines two dates to represent the time interval.","type":{"names":["Object"]},"properties":[{"type":{"names":["Date","String","Number"]},"description":"the start of the interval","name":"start"},{"type":{"names":["Date","String","Number"]},"description":"the end of the interval","name":"end"}],"category":"Types","meta":{"lineno":1,"filename":"Interval.js","path":"/Users/lesha/Work/date-fns/docs"},"summary":"An object that combines two dates to represent the time interval.","order":0}},{"type":"jsdoc","urlId":"Options","category":"Types","title":"Options","description":"An object passed as the last optional argument to all functions.","content":{"id":"Options","longname":"Options","name":"Options","kind":"typedef","scope":"global","description":"An object passed as the last optional argument to all functions.","examples":["// For 15 December 12345 AD, represent the start of the week in Esperanto,\n// if the first day of the week is Monday:\nvar eoLocale = require('date-fns/locale/eo')\nvar options = {\n weekStartsOn: 1,\n additionalDigits: 1,\n locale: eoLocale\n}\nvar result = format(startOfWeek('+12345-12-15', options), 'dddd, D MMMM YYYY', options)\n//=> 'lundo, 10 decembro 12345'"],"type":{"names":["Object"]},"properties":[{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday).\n Used by `differenceInCalendarWeeks`, `endOfWeek`, `isSameWeek`,\n `isThisWeek`, `lastDayOfWeek`, `setDay`, and `startOfWeek`","name":"weekStartsOn"},{"type":{"names":["0","1","2"]},"optional":true,"defaultvalue":2,"description":"the additional number of digits in the extended year format.\n Used by all functions that take String as Date-like argument.\n Internally, passed to `toDate` to specify which way to convert extended year formatted String to Date.\n See [toDate]{@link docs/toDate}","name":"additionalDigits"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object.\n Used by `distanceInWords`, `distanceInWordsStrict`, `format` and `parse`.\n See [Locale]{@link docs/Locale}","name":"locale"},{"type":{"names":["'s'","'m'","'h'","'d'","'M'","'Y'"]},"optional":true,"description":"used by `distanceInWordsStrict`.\n If specified, will force a unit","name":"unit"},{"type":{"names":["'floor'","'ceil'","'round'"]},"optional":true,"defaultvalue":"'floor'","description":"used by `distanceInWordsStrict`.\n Specifies, which way to round partial units","name":"partialMethod"}],"category":"Types","meta":{"lineno":1,"filename":"Options.js","path":"/Users/lesha/Work/date-fns/docs"},"summary":"An object passed as the last optional argument to all functions.","order":0}},{"type":"jsdoc","urlId":"Locale","category":"Types","title":"Locale","description":"A locale object.","content":{"id":"Locale","longname":"Locale","name":"Locale","kind":"typedef","scope":"global","description":"A locale object.","type":{"names":["Object"]},"properties":[{"type":{"names":["Object"]},"optional":true,"description":"the object used to localize\n `distanceInWords` and `distanceInWordsStrict` functions","name":"distanceInWords"},{"type":{"names":["function"]},"optional":true,"name":"distanceInWords.localize"},{"type":{"names":["Object"]},"optional":true,"description":"the object used to localize `format` function","name":"format"},{"type":{"names":["Object"]},"optional":true,"description":"the object with formatter functions","name":"format.formatters"},{"type":{"names":["RegExp"]},"optional":true,"description":"a RegExp used to split a format string into the token array","name":"format.formattingTokensRegExp"},{"type":{"names":["Object"]},"optional":true,"description":"the object used to localize `parse` function","name":"parse"},{"type":{"names":["Object"]},"optional":true,"description":"the object with units","name":"parse.units"},{"type":{"names":["Object"]},"optional":true,"description":"the object with parsers","name":"parse.parsers"},{"type":{"names":["RegExp"]},"optional":true,"description":"a RegExp used to split a format string into the token array","name":"parse.parsingTokensRegExp"}],"category":"Types","meta":{"lineno":1,"filename":"Locale.js","path":"/Users/lesha/Work/date-fns/docs"},"summary":"A locale object.","order":0}}],"Common Helpers":[{"type":"jsdoc","urlId":"closestIndexTo","category":"Common Helpers","title":"closestIndexTo","description":"Return an index of the closest date from the array comparing to the given date.","content":{"id":"closestIndexTo","longname":"closestIndexTo","name":"closestIndexTo","kind":"member","scope":"global","description":"Return an index of the closest date from the array comparing to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Array.","Array.","Array."]},"description":"the array to search","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which date is closer to 6 September 2015?\nvar dateToCompare = new Date(2015, 8, 6)\nvar datesArray = [\n new Date(2015, 0, 1),\n new Date(2016, 0, 1),\n new Date(2017, 0, 1)\n]\nvar result = closestIndexTo(dateToCompare, datesArray)\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"an index of the date closest to the given date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/closest_index_to"},"summary":"Return an index of the closest date from the array comparing to the given date.","order":0}},{"type":"jsdoc","urlId":"closestTo","category":"Common Helpers","title":"closestTo","description":"Return a date from the array closest to the given date.","content":{"id":"closestTo","longname":"closestTo","name":"closestTo","kind":"member","scope":"global","description":"Return a date from the array closest to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Array.","Array.","Array."]},"description":"the array to search","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?\nvar dateToCompare = new Date(2015, 8, 6)\nvar result = closestTo(dateToCompare, [\n new Date(2000, 0, 1),\n new Date(2030, 0, 1)\n])\n//=> Tue Jan 01 2030 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the date from the array closest to the given date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/closest_to"},"summary":"Return a date from the array closest to the given date.","order":0}},{"type":"jsdoc","urlId":"compareAsc","category":"Common Helpers","title":"compareAsc","description":"Compare the two dates and return -1, 0 or 1.","content":{"id":"compareAsc","longname":"compareAsc","name":"compareAsc","kind":"member","scope":"global","description":"Compare the two dates and return 1 if the first date is after the second,\n-1 if the first date is before the second or 0 if dates are equal.","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to compare","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to compare","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Compare 11 February 1987 and 10 July 1989:\nvar result = compareAsc(\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n)\n//=> -1","// Sort the array of dates:\nvar result = [\n new Date(1995, 6, 2),\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n].sort(compareAsc)\n//=> [\n// Wed Feb 11 1987 00:00:00,\n// Mon Jul 10 1989 00:00:00,\n// Sun Jul 02 1995 00:00:00\n// ]"],"returns":[{"type":{"names":["Number"]},"description":"the result of the comparison"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/compare_asc"},"summary":"Compare the two dates and return -1, 0 or 1.","order":0}},{"type":"jsdoc","urlId":"compareDesc","category":"Common Helpers","title":"compareDesc","description":"Compare the two dates reverse chronologically and return -1, 0 or 1.","content":{"id":"compareDesc","longname":"compareDesc","name":"compareDesc","kind":"member","scope":"global","description":"Compare the two dates and return -1 if the first date is after the second,\n1 if the first date is before the second or 0 if dates are equal.","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to compare","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to compare","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Compare 11 February 1987 and 10 July 1989 reverse chronologically:\nvar result = compareDesc(\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n)\n//=> 1","// Sort the array of dates in reverse chronological order:\nvar result = [\n new Date(1995, 6, 2),\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n].sort(compareDesc)\n//=> [\n// Sun Jul 02 1995 00:00:00,\n// Mon Jul 10 1989 00:00:00,\n// Wed Feb 11 1987 00:00:00\n// ]"],"returns":[{"type":{"names":["Number"]},"description":"the result of the comparison"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/compare_desc"},"summary":"Compare the two dates reverse chronologically and return -1, 0 or 1.","order":0}},{"type":"jsdoc","urlId":"distanceInWords","category":"Common Helpers","title":"distanceInWords","description":"Return the distance between the given dates in words.","content":{"id":"distanceInWords","longname":"distanceInWords","name":"distanceInWords","kind":"member","scope":"global","description":"Return the distance between the given dates in words.\n\n| Distance between dates | Result |\n|-------------------------------------------------------------------|---------------------|\n| 0 ... 30 secs | less than a minute |\n| 30 secs ... 1 min 30 secs | 1 minute |\n| 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n| 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n| 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n| 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n| 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n| 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n| 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n| 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n| 1 yr ... 1 yr 3 months | about 1 year |\n| 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n| 1 yr 9 months ... 2 yrs | almost 2 years |\n| N yrs ... N yrs 3 months | about N years |\n| N yrs 3 months ... N yrs 9 months | over N years |\n| N yrs 9 months ... N+1 yrs | almost N+1 years |\n\nWith `options.includeSeconds == true`:\n| Distance between dates | Result |\n|------------------------|----------------------|\n| 0 secs ... 5 secs | less than 5 seconds |\n| 5 secs ... 10 secs | less than 10 seconds |\n| 10 secs ... 20 secs | less than 20 seconds |\n| 20 secs ... 40 secs | half a minute |\n| 40 secs ... 60 secs | less than a minute |\n| 60 secs ... 90 secs | 1 minute |","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Date","String","Number"]},"description":"the other date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"distances less than a minute are more detailed","name":"options.includeSeconds"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"result indicates if the second date is earlier or later than the first","name":"options.addSuffix"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"}],"examples":["// What is the distance between 2 July 2014 and 1 January 2015?\nvar result = distanceInWords(\n new Date(2014, 6, 2),\n new Date(2015, 0, 1)\n)\n//=> '6 months'","// What is the distance between 1 January 2015 00:00:15\n// and 1 January 2015 00:00:00, including seconds?\nvar result = distanceInWords(\n new Date(2015, 0, 1, 0, 0, 15),\n new Date(2015, 0, 1, 0, 0, 0),\n {includeSeconds: true}\n)\n//=> 'less than 20 seconds'","// What is the distance from 1 January 2016\n// to 1 January 2015, with a suffix?\nvar result = distanceInWords(\n new Date(2016, 0, 1),\n new Date(2015, 0, 1),\n {addSuffix: true}\n)\n//=> 'about 1 year ago'","// What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\nimport { eoLocale } from 'date-fns/locale/eo'\nvar result = distanceInWords(\n new Date(2016, 7, 1),\n new Date(2015, 0, 1),\n {locale: eoLocale}\n)\n//=> 'pli ol 1 jaro'"],"returns":[{"type":{"names":["String"]},"description":"the distance in words"}],"category":"Common Helpers","meta":{"lineno":12,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/distance_in_words"},"summary":"Return the distance between the given dates in words.","order":0}},{"type":"jsdoc","urlId":"distanceInWordsStrict","category":"Common Helpers","title":"distanceInWordsStrict","description":"Return the distance between the given dates in words.","content":{"id":"distanceInWordsStrict","longname":"distanceInWordsStrict","name":"distanceInWordsStrict","kind":"member","scope":"global","description":"Return the distance between the given dates in words, using strict units.\nThis is like `distanceInWords`, but does not use helpers like 'almost', 'over',\n'less than' and the like.\n\n| Distance between dates | Result |\n|------------------------|---------------------|\n| 0 ... 59 secs | [0..59] seconds |\n| 1 ... 59 mins | [1..59] minutes |\n| 1 ... 23 hrs | [1..23] hours |\n| 1 ... 29 days | [1..29] days |\n| 1 ... 11 months | [1..11] months |\n| 1 ... N years | [1..N] years |","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Date","String","Number"]},"description":"the other date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"result indicates if the second date is earlier or later than the first","name":"options.addSuffix"},{"type":{"names":["'s'","'m'","'h'","'d'","'M'","'Y'"]},"optional":true,"description":"if specified, will force a unit","name":"options.unit"},{"type":{"names":["'floor'","'ceil'","'round'"]},"optional":true,"defaultvalue":"'floor'","description":"which way to round partial units","name":"options.partialMethod"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"}],"examples":["// What is the distance between 2 July 2014 and 1 January 2015?\nvar result = distanceInWordsStrict(\n new Date(2014, 6, 2),\n new Date(2015, 0, 2)\n)\n//=> '6 months'","// What is the distance between 1 January 2015 00:00:15\n// and 1 January 2015 00:00:00?\nvar result = distanceInWordsStrict(\n new Date(2015, 0, 1, 0, 0, 15),\n new Date(2015, 0, 1, 0, 0, 0),\n)\n//=> '15 seconds'","// What is the distance from 1 January 2016\n// to 1 January 2015, with a suffix?\nvar result = distanceInWordsStrict(\n new Date(2016, 0, 1),\n new Date(2015, 0, 1),\n {addSuffix: true}\n)\n//=> '1 year ago'","// What is the distance from 1 January 2016\n// to 1 January 2015, in minutes?\nvar result = distanceInWordsStrict(\n new Date(2016, 0, 1),\n new Date(2015, 0, 1),\n {unit: 'm'}\n)\n//=> '525600 minutes'","// What is the distance from 1 January 2016\n// to 28 January 2015, in months, rounded up?\nvar result = distanceInWordsStrict(\n new Date(2015, 0, 28),\n new Date(2015, 0, 1),\n {unit: 'M', partialMethod: 'ceil'}\n)\n//=> '1 month'","// What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\nimport { eoLocale } from 'date-fns/locale/eo'\nvar result = distanceInWordsStrict(\n new Date(2016, 7, 1),\n new Date(2015, 0, 1),\n {locale: eoLocale}\n)\n//=> '1 jaro'"],"returns":[{"type":{"names":["String"]},"description":"the distance in words"}],"category":"Common Helpers","meta":{"lineno":10,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/distance_in_words_strict"},"summary":"Return the distance between the given dates in words.","order":0}},{"type":"jsdoc","urlId":"format","category":"Common Helpers","title":"format","description":"Format the date.","content":{"id":"format","longname":"format","name":"format","kind":"member","scope":"global","description":"Return the formatted date string in the given format.\n\nAccepted tokens:\n| Unit | Token | Result examples |\n|-------------------------|-------|----------------------------------|\n| Month | M | 1, 2, ..., 12 |\n| | Mo | 1st, 2nd, ..., 12th |\n| | MM | 01, 02, ..., 12 |\n| | MMM | Jan, Feb, ..., Dec |\n| | MMMM | January, February, ..., December |\n| Quarter | Q | 1, 2, 3, 4 |\n| | Qo | 1st, 2nd, 3rd, 4th |\n| Day of month | D | 1, 2, ..., 31 |\n| | Do | 1st, 2nd, ..., 31st |\n| | DD | 01, 02, ..., 31 |\n| Day of year | DDD | 1, 2, ..., 366 |\n| | DDDo | 1st, 2nd, ..., 366th |\n| | DDDD | 001, 002, ..., 366 |\n| Day of week | d | 0, 1, ..., 6 |\n| | do | 0th, 1st, ..., 6th |\n| | dd | Su, Mo, ..., Sa |\n| | ddd | Sun, Mon, ..., Sat |\n| | dddd | Sunday, Monday, ..., Saturday |\n| Day of ISO week | E | 1, 2, ..., 7 |\n| ISO week | W | 1, 2, ..., 53 |\n| | Wo | 1st, 2nd, ..., 53rd |\n| | WW | 01, 02, ..., 53 |\n| Year | YY | 00, 01, ..., 99 |\n| | YYYY | 1900, 1901, ..., 2099 |\n| ISO week-numbering year | GG | 00, 01, ..., 99 |\n| | GGGG | 1900, 1901, ..., 2099 |\n| AM/PM | A | AM, PM |\n| | a | am, pm |\n| | aa | a.m., p.m. |\n| Hour | H | 0, 1, ... 23 |\n| | HH | 00, 01, ... 23 |\n| | h | 1, 2, ..., 12 |\n| | hh | 01, 02, ..., 12 |\n| Minute | m | 0, 1, ..., 59 |\n| | mm | 00, 01, ..., 59 |\n| Second | s | 0, 1, ..., 59 |\n| | ss | 00, 01, ..., 59 |\n| 1/10 of second | S | 0, 1, ..., 9 |\n| 1/100 of second | SS | 00, 01, ..., 99 |\n| Millisecond | SSS | 000, 001, ..., 999 |\n| Timezone | Z | -01:00, +00:00, ... +12:00 |\n| | ZZ | -0100, +0000, ..., +1200 |\n| Seconds timestamp | X | 512969520 |\n| Milliseconds timestamp | x | 512969520900 |\n\nThe characters wrapped in square brackets are escaped.\n\nThe result may vary by locale.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["String"]},"description":"the string of tokens","name":"format"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"}],"examples":["// Represent 11 February 2014 in middle-endian format:\nvar result = format(\n new Date(2014, 1, 11),\n 'MM/DD/YYYY'\n)\n//=> '02/11/2014'","// Represent 2 July 2014 in Esperanto:\nimport { eoLocale } from 'date-fns/locale/eo'\nvar result = format(\n new Date(2014, 6, 2),\n 'Do [de] MMMM YYYY',\n {locale: eoLocale}\n)\n//=> '2-a de julio 2014'"],"returns":[{"type":{"names":["String"]},"description":"the formatted date string"}],"category":"Common Helpers","summary":"Format the date.","exceptions":[{"type":{"names":["Error"]},"description":"The date must be valid"}],"meta":{"lineno":10,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/format"},"order":0}},{"type":"jsdoc","urlId":"isAfter","category":"Common Helpers","title":"isAfter","description":"Is the first date after the second one?","content":{"id":"isAfter","longname":"isAfter","name":"isAfter","kind":"member","scope":"global","description":"Is the first date after the second one?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date that should be after the other one to return true","name":"date"},{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 10 July 1989 after 11 February 1987?\nvar result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the first date is after the second date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_after"},"summary":"Is the first date after the second one?","order":0}},{"type":"jsdoc","urlId":"isBefore","category":"Common Helpers","title":"isBefore","description":"Is the first date before the second one?","content":{"id":"isBefore","longname":"isBefore","name":"isBefore","kind":"member","scope":"global","description":"Is the first date before the second one?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date that should be before the other one to return true","name":"date"},{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 10 July 1989 before 11 February 1987?\nvar result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the first date is before the second date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_before"},"summary":"Is the first date before the second one?","order":0}},{"type":"jsdoc","urlId":"isDate","category":"Common Helpers","title":"isDate","description":"Is the given argument an instance of Date?","content":{"id":"isDate","longname":"isDate","name":"isDate","kind":"member","scope":"global","description":"Is the given argument an instance of Date?","params":[{"type":{"names":["*"]},"description":"the argument to check","name":"argument"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 'mayonnaise' a Date?\nvar result = isDate('mayonnaise')\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the given argument is an instance of Date"}],"category":"Common Helpers","meta":{"lineno":1,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_date"},"summary":"Is the given argument an instance of Date?","order":0}},{"type":"jsdoc","urlId":"isEqual","category":"Common Helpers","title":"isEqual","description":"Are the given dates equal?","content":{"id":"isEqual","longname":"isEqual","name":"isEqual","kind":"member","scope":"global","description":"Are the given dates equal?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to compare","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to compare","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\nvar result = isEqual(\n new Date(2014, 6, 2, 6, 30, 45, 0)\n new Date(2014, 6, 2, 6, 30, 45, 500)\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are equal"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_equal"},"summary":"Are the given dates equal?","order":0}},{"type":"jsdoc","urlId":"isValid","category":"Common Helpers","title":"isValid","description":"Is the given date valid?","content":{"id":"isValid","longname":"isValid","name":"isValid","kind":"member","scope":"global","description":"Returns false if argument is Invalid Date and true otherwise.\nInvalid Date is a Date, whose time value is NaN.\n\nTime value of Date: http://es5.github.io/#x15.9.1.1","params":[{"type":{"names":["Date"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// For the valid date:\nvar result = isValid(new Date(2014, 1, 31))\n//=> true","// For the invalid date:\nvar result = isValid(new Date(''))\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is valid"}],"category":"Common Helpers","summary":"Is the given date valid?","exceptions":[{"type":{"names":["TypeError"]},"description":"argument must be an instance of Date"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_valid"},"order":0}},{"type":"jsdoc","urlId":"max","category":"Common Helpers","title":"max","description":"Return the latest of the given dates.","content":{"id":"max","longname":"max","name":"max","kind":"member","scope":"global","description":"Return the latest of the given dates.","params":[{"type":{"names":["Array.","Array.","Array."]},"description":"the dates to compare","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which of these dates is the latest?\nvar result = max(\n [\n new Date(1989, 6, 10),\n new Date(1987, 1, 11),\n new Date(1995, 6, 2),\n new Date(1990, 0, 1)\n ]\n)\n//=> Sun Jul 02 1995 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the latest of the dates"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/max"},"summary":"Return the latest of the given dates.","order":0}},{"type":"jsdoc","urlId":"min","category":"Common Helpers","title":"min","description":"Return the earliest of the given dates.","content":{"id":"min","longname":"min","name":"min","kind":"member","scope":"global","description":"Return the earliest of the given dates.","params":[{"type":{"names":["Array.","Array.","Array."]},"description":"the dates to compare","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which of these dates is the earliest?\nvar result = min(\n [\n new Date(1989, 6, 10),\n new Date(1987, 1, 11),\n new Date(1995, 6, 2),\n new Date(1990, 0, 1)\n ]\n)\n//=> Wed Feb 11 1987 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the earliest of the dates"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/min"},"summary":"Return the earliest of the given dates.","order":0}},{"type":"jsdoc","urlId":"parse","category":"Common Helpers","title":"parse","description":"Parse the date.","content":{"id":"parse","longname":"parse","name":"parse","kind":"member","scope":"global","description":"Return the date parsed from string using the given format.\n\nAccepted format tokens:\n| Unit | Priority | Token | Input examples |\n|-------------------------|----------|-------|----------------------------------|\n| Year | 10 | YY | 00, 01, ..., 99 |\n| | | YYYY | 1900, 1901, ..., 2099 |\n| ISO week-numbering year | 10 | GG | 00, 01, ..., 99 |\n| | | GGGG | 1900, 1901, ..., 2099 |\n| Quarter | 20 | Q | 1, 2, 3, 4 |\n| | | Qo | 1st, 2nd, 3rd, 4th |\n| Month | 30 | M | 1, 2, ..., 12 |\n| | | Mo | 1st, 2nd, ..., 12th |\n| | | MM | 01, 02, ..., 12 |\n| | | MMM | Jan, Feb, ..., Dec |\n| | | MMMM | January, February, ..., December |\n| ISO week | 40 | W | 1, 2, ..., 53 |\n| | | Wo | 1st, 2nd, ..., 53rd |\n| | | WW | 01, 02, ..., 53 |\n| Day of week | 50 | d | 0, 1, ..., 6 |\n| | | do | 0th, 1st, ..., 6th |\n| | | dd | Su, Mo, ..., Sa |\n| | | ddd | Sun, Mon, ..., Sat |\n| | | dddd | Sunday, Monday, ..., Saturday |\n| Day of ISO week | 50 | E | 1, 2, ..., 7 |\n| Day of month | 50 | D | 1, 2, ..., 31 |\n| | | Do | 1st, 2nd, ..., 31st |\n| | | DD | 01, 02, ..., 31 |\n| Day of year | 50 | DDD | 1, 2, ..., 366 |\n| | | DDDo | 1st, 2nd, ..., 366th |\n| | | DDDD | 001, 002, ..., 366 |\n| Hour | 60 | H | 0, 1, ... 23 |\n| | | HH | 00, 01, ... 23 |\n| | | h | 1, 2, ..., 12 |\n| | | hh | 01, 02, ..., 12 |\n| AM/PM | 65 | A | AM, PM |\n| | | a | am, pm |\n| | | aa | a.m., p.m. |\n| Minute | 70 | m | 0, 1, ..., 59 |\n| | | mm | 00, 01, ..., 59 |\n| Second | 80 | s | 0, 1, ..., 59 |\n| | | ss | 00, 01, ..., 59 |\n| 1/10 of second | 90 | S | 0, 1, ..., 9 |\n| 1/100 of second | 90 | SS | 00, 01, ..., 99 |\n| Millisecond | 90 | SSS | 000, 001, ..., 999 |\n| Timezone | 100 | Z | -01:00, +00:00, ... +12:00 |\n| | | ZZ | -0100, +0000, ..., +1200 |\n| Seconds timestamp | 110 | X | 512969520 |\n| Milliseconds timestamp | 110 | x | 512969520900 |\n\nValues will be assigned to the date in the ascending order of its unit's priority.\nUnits of an equal priority overwrite each other in the order of appearance.\n\nIf no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\nthe values will be taken from 3rd argument `baseDate` which works as a context of parsing.\n\n`baseDate` must be passed for correct work of the function.\nIf you're not sure which `baseDate` to supply, create a new instance of Date:\n`parse('02/11/2014', 'MM/DD/YYYY', new Date())`\nIn this case parsing will be done in the context of the current date.\n\nThe characters wrapped in square brackets in the format string are escaped.\n\nThe result may vary by locale.\n\nIf no format is provided, the string will be parsed using ISO 8601 formats.","params":[{"type":{"names":["String"]},"description":"the string to parse","name":"dateString"},{"type":{"names":["String"]},"description":"the string of tokens","name":"formatString"},{"type":{"names":["Date","String","Number"]},"description":"the date to took the missing higher priority values from","name":"baseDate"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// Parse 11 February 2014 from middle-endian format:\nvar result = parse(\n '02/11/2014',\n 'MM/DD/YYYY',\n new Date()\n)\n//=> Tue Feb 11 2014 00:00:00","// Parse 28th of February in English locale in the context of 2010 year:\nimport eoLocale from 'date-fns/locale/eo'\nvar result = parse(\n '28-a de februaro',\n 'Do [de] MMMM',\n new Date(2010, 0, 1)\n {locale: eoLocale}\n)\n//=> Sun Feb 28 2010 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the parsed date"}],"category":"Common Helpers","meta":{"lineno":10,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/parse"},"summary":"Parse the date.","order":0}},{"type":"jsdoc","urlId":"toDate","category":"Common Helpers","title":"toDate","description":"Convert the given argument to an instance of Date.","content":{"id":"toDate","longname":"toDate","name":"toDate","kind":"member","scope":"global","description":"Convert the given argument to an instance of Date.\n\nIf the argument is an instance of Date, the function returns its clone.\n\nIf the argument is a number, it is treated as a timestamp.\n\nIf an argument is a string, the function tries to parse it.\nFunction accepts complete ISO 8601 formats as well as partial implementations.\nISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n\nIf all above fails, the function passes the given argument to Date constructor.","params":[{"type":{"names":["Date","String","Number"]},"description":"the value to convert","name":"argument"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["0","1","2"]},"optional":true,"defaultvalue":2,"description":"the additional number of digits in the extended year format","name":"options.additionalDigits"}],"examples":["// Convert string '2014-02-11T11:30:30' to date:\nvar result = toDate('2014-02-11T11:30:30')\n//=> Tue Feb 11 2014 11:30:30","// Convert string '+02014101' to date,\n// if the additional number of digits in the extended year format is 1:\nvar result = toDate('+02014101', {additionalDigits: 1})\n//=> Fri Apr 11 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the parsed date in the local time zone"}],"category":"Common Helpers","meta":{"lineno":43,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/to_date"},"summary":"Convert the given argument to an instance of Date.","order":0}}],"Interval Helpers":[{"type":"jsdoc","urlId":"areIntervalsOverlapping","category":"Interval Helpers","title":"areIntervalsOverlapping","description":"Is the given time interval overlapping with another time interval?","content":{"id":"areIntervalsOverlapping","longname":"areIntervalsOverlapping","name":"areIntervalsOverlapping","kind":"member","scope":"global","description":"Is the given time interval overlapping with another time interval?","params":[{"type":{"names":["Interval"]},"description":"the first interval to compare. See [Interval]{@link docs/types/Interval}","name":"intervalLeft"},{"type":{"names":["Interval"]},"description":"the second interval to compare. See [Interval]{@link docs/types/Interval}","name":"intervalRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/types/Options}","name":"options"}],"examples":["// For overlapping time intervals:\nareIntervalsOverlapping(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n)\n//=> true","// For non-overlapping time intervals:\nareIntervalsOverlapping(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 21), end: new Date(2014, 0, 22)}\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"whether the time intervals are overlapping"}],"category":"Interval Helpers","summary":"Is the given time interval overlapping with another time interval?","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/are_intervals_overlapping"},"order":0}},{"type":"jsdoc","urlId":"eachDayOfInterval","category":"Interval Helpers","title":"eachDayOfInterval","description":"Return the array of dates within the specified time interval.","content":{"id":"eachDayOfInterval","longname":"eachDayOfInterval","name":"eachDayOfInterval","kind":"member","scope":"global","description":"Return the array of dates within the specified time interval.","params":[{"type":{"names":["Interval"]},"description":"the interval. See [Interval]{@link docs/types/Interval}","name":"interval"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Each day between 6 October 2014 and 10 October 2014:\nvar result = eachDayOfInterval({\n start: new Date(2014, 9, 6),\n end: new Date(2014, 9, 10)\n})\n//=> [\n// Mon Oct 06 2014 00:00:00,\n// Tue Oct 07 2014 00:00:00,\n// Wed Oct 08 2014 00:00:00,\n// Thu Oct 09 2014 00:00:00,\n// Fri Oct 10 2014 00:00:00\n// ]"],"returns":[{"type":{"names":["Array."]},"description":"the array with starts of days from the day of the interval start to the day of the interval end"}],"category":"Interval Helpers","summary":"Return the array of dates within the specified time interval.","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/each_day_of_interval"},"order":0}},{"type":"jsdoc","urlId":"getOverlappingDaysInIntervals","category":"Interval Helpers","title":"getOverlappingDaysInIntervals","description":"Get the number of days that overlap in two time intervals","content":{"id":"getOverlappingDaysInIntervals","longname":"getOverlappingDaysInIntervals","name":"getOverlappingDaysInIntervals","kind":"member","scope":"global","description":"Get the number of days that overlap in two time intervals","params":[{"type":{"names":["Interval"]},"description":"the first interval to compare. See [Interval]{@link docs/Interval}","name":"intervalLeft"},{"type":{"names":["Interval"]},"description":"the second interval to compare. See [Interval]{@link docs/Interval}","name":"intervalRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// For overlapping time intervals adds 1 for each started overlapping day:\ngetOverlappingDaysInIntervals(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n)\n//=> 3","// For non-overlapping time intervals returns 0:\ngetOverlappingDaysInIntervals(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 21), end: new Date(2014, 0, 22)}\n)\n//=> 0"],"returns":[{"type":{"names":["Number"]},"description":"the number of days that overlap in two time intervals"}],"category":"Interval Helpers","summary":"Get the number of days that overlap in two time intervals","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_overlapping_days_in_intervals"},"order":0}},{"type":"jsdoc","urlId":"isWithinInterval","category":"Interval Helpers","title":"isWithinInterval","description":"Is the given date within the interval?","content":{"id":"isWithinInterval","longname":"isWithinInterval","name":"isWithinInterval","kind":"member","scope":"global","description":"Is the given date within the interval?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Interval"]},"description":"the interval to check","name":"interval"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// For the date within the interval:\nisWithinInterval(\n new Date(2014, 0, 3),\n {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)}\n)\n//=> true","// For the date outside of the interval:\nisWithinInterval(\n new Date(2014, 0, 10),\n {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)}\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is within the interval"}],"category":"Interval Helpers","summary":"Is the given date within the interval?","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_within_interval"},"order":0}}],"Timestamp Helpers":[{"type":"jsdoc","urlId":"getTime","category":"Timestamp Helpers","title":"getTime","description":"Get the milliseconds timestamp of the given date.","content":{"id":"getTime","longname":"getTime","name":"getTime","kind":"member","scope":"global","description":"Get the milliseconds timestamp of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the timestamp of 29 February 2012 11:45:05.123:\nvar result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n//=> 1330515905123"],"returns":[{"type":{"names":["Number"]},"description":"the timestamp"}],"category":"Timestamp Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_time"},"summary":"Get the milliseconds timestamp of the given date.","order":0}}],"Millisecond Helpers":[{"type":"jsdoc","urlId":"addMilliseconds","category":"Millisecond Helpers","title":"addMilliseconds","description":"Add the specified number of milliseconds to the given date.","content":{"id":"addMilliseconds","longname":"addMilliseconds","name":"addMilliseconds","kind":"member","scope":"global","description":"Add the specified number of milliseconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of milliseconds to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 750 milliseconds to 10 July 2014 12:45:30.000:\nvar result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n//=> Thu Jul 10 2014 12:45:30.750"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the milliseconds added"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_milliseconds"},"summary":"Add the specified number of milliseconds to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInMilliseconds","category":"Millisecond Helpers","title":"differenceInMilliseconds","description":"Get the number of milliseconds between the given dates.","content":{"id":"differenceInMilliseconds","longname":"differenceInMilliseconds","name":"differenceInMilliseconds","kind":"member","scope":"global","description":"Get the number of milliseconds between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many milliseconds are between\n// 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\nvar result = differenceInMilliseconds(\n new Date(2014, 6, 2, 12, 30, 20, 600),\n new Date(2014, 6, 2, 12, 30, 21, 700)\n)\n//=> 1100"],"returns":[{"type":{"names":["Number"]},"description":"the number of milliseconds"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_milliseconds"},"summary":"Get the number of milliseconds between the given dates.","order":0}},{"type":"jsdoc","urlId":"getMilliseconds","category":"Millisecond Helpers","title":"getMilliseconds","description":"Get the milliseconds of the given date.","content":{"id":"getMilliseconds","longname":"getMilliseconds","name":"getMilliseconds","kind":"member","scope":"global","description":"Get the milliseconds of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the milliseconds of 29 February 2012 11:45:05.123:\nvar result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n//=> 123"],"returns":[{"type":{"names":["Number"]},"description":"the milliseconds"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_milliseconds"},"summary":"Get the milliseconds of the given date.","order":0}},{"type":"jsdoc","urlId":"setMilliseconds","category":"Millisecond Helpers","title":"setMilliseconds","description":"Set the milliseconds to the given date.","content":{"id":"setMilliseconds","longname":"setMilliseconds","name":"setMilliseconds","kind":"member","scope":"global","description":"Set the milliseconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the milliseconds of the new date","name":"milliseconds"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 300 milliseconds to 1 September 2014 11:30:40.500:\nvar result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n//=> Mon Sep 01 2014 11:30:40.300"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the milliseconds setted"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_milliseconds"},"summary":"Set the milliseconds to the given date.","order":0}},{"type":"jsdoc","urlId":"subMilliseconds","category":"Millisecond Helpers","title":"subMilliseconds","description":"Subtract the specified number of milliseconds from the given date.","content":{"id":"subMilliseconds","longname":"subMilliseconds","name":"subMilliseconds","kind":"member","scope":"global","description":"Subtract the specified number of milliseconds from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of milliseconds to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\nvar result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n//=> Thu Jul 10 2014 12:45:29.250"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the milliseconds subtracted"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_milliseconds"},"summary":"Subtract the specified number of milliseconds from the given date.","order":0}}],"Second Helpers":[{"type":"jsdoc","urlId":"addSeconds","category":"Second Helpers","title":"addSeconds","description":"Add the specified number of seconds to the given date.","content":{"id":"addSeconds","longname":"addSeconds","name":"addSeconds","kind":"member","scope":"global","description":"Add the specified number of seconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of seconds to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 30 seconds to 10 July 2014 12:45:00:\nvar result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n//=> Thu Jul 10 2014 12:45:30"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the seconds added"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_seconds"},"summary":"Add the specified number of seconds to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInSeconds","category":"Second Helpers","title":"differenceInSeconds","description":"Get the number of seconds between the given dates.","content":{"id":"differenceInSeconds","longname":"differenceInSeconds","name":"differenceInSeconds","kind":"member","scope":"global","description":"Get the number of seconds between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many seconds are between\n// 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\nvar result = differenceInSeconds(\n new Date(2014, 6, 2, 12, 30, 7, 999),\n new Date(2014, 6, 2, 12, 30, 20, 0)\n)\n//=> 12"],"returns":[{"type":{"names":["Number"]},"description":"the number of seconds"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_seconds"},"summary":"Get the number of seconds between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfSecond","category":"Second Helpers","title":"endOfSecond","description":"Return the end of a second for the given date.","content":{"id":"endOfSecond","longname":"endOfSecond","name":"endOfSecond","kind":"member","scope":"global","description":"Return the end of a second for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a second for 1 December 2014 22:15:45.400:\nvar result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:45.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a second"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_second"},"summary":"Return the end of a second for the given date.","order":0}},{"type":"jsdoc","urlId":"getSeconds","category":"Second Helpers","title":"getSeconds","description":"Get the seconds of the given date.","content":{"id":"getSeconds","longname":"getSeconds","name":"getSeconds","kind":"member","scope":"global","description":"Get the seconds of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the seconds of 29 February 2012 11:45:05.123:\nvar result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n//=> 5"],"returns":[{"type":{"names":["Number"]},"description":"the seconds"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_seconds"},"summary":"Get the seconds of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameSecond","category":"Second Helpers","title":"isSameSecond","description":"Are the given dates in the same second?","content":{"id":"isSameSecond","longname":"isSameSecond","name":"isSameSecond","kind":"member","scope":"global","description":"Are the given dates in the same second?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500\n// in the same second?\nvar result = isSameSecond(\n new Date(2014, 8, 4, 6, 30, 15),\n new Date(2014, 8, 4, 6, 30, 15, 500)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same second"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_second"},"summary":"Are the given dates in the same second?","order":0}},{"type":"jsdoc","urlId":"setSeconds","category":"Second Helpers","title":"setSeconds","description":"Set the seconds to the given date.","content":{"id":"setSeconds","longname":"setSeconds","name":"setSeconds","kind":"member","scope":"global","description":"Set the seconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the seconds of the new date","name":"seconds"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 45 seconds to 1 September 2014 11:30:40:\nvar result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n//=> Mon Sep 01 2014 11:30:45"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the seconds setted"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_seconds"},"summary":"Set the seconds to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfSecond","category":"Second Helpers","title":"startOfSecond","description":"Return the start of a second for the given date.","content":{"id":"startOfSecond","longname":"startOfSecond","name":"startOfSecond","kind":"member","scope":"global","description":"Return the start of a second for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a second for 1 December 2014 22:15:45.400:\nvar result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:45.000"],"returns":[{"type":{"names":["Date"]},"description":"the start of a second"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_second"},"summary":"Return the start of a second for the given date.","order":0}},{"type":"jsdoc","urlId":"subSeconds","category":"Second Helpers","title":"subSeconds","description":"Subtract the specified number of seconds from the given date.","content":{"id":"subSeconds","longname":"subSeconds","name":"subSeconds","kind":"member","scope":"global","description":"Subtract the specified number of seconds from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of seconds to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 30 seconds from 10 July 2014 12:45:00:\nvar result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n//=> Thu Jul 10 2014 12:44:30"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the seconds subtracted"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_seconds"},"summary":"Subtract the specified number of seconds from the given date.","order":0}}],"Minute Helpers":[{"type":"jsdoc","urlId":"addMinutes","category":"Minute Helpers","title":"addMinutes","description":"Add the specified number of minutes to the given date.","content":{"id":"addMinutes","longname":"addMinutes","name":"addMinutes","kind":"member","scope":"global","description":"Add the specified number of minutes to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of minutes to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 30 minutes to 10 July 2014 12:00:00:\nvar result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n//=> Thu Jul 10 2014 12:30:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the minutes added"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_minutes"},"summary":"Add the specified number of minutes to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInMinutes","category":"Minute Helpers","title":"differenceInMinutes","description":"Get the number of minutes between the given dates.","content":{"id":"differenceInMinutes","longname":"differenceInMinutes","name":"differenceInMinutes","kind":"member","scope":"global","description":"Get the number of minutes between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\nvar result = differenceInMinutes(\n new Date(2014, 6, 2, 12, 7, 59),\n new Date(2014, 6, 2, 12, 20, 0)\n)\n//=> 12"],"returns":[{"type":{"names":["Number"]},"description":"the number of minutes"}],"category":"Minute Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_minutes"},"summary":"Get the number of minutes between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfMinute","category":"Minute Helpers","title":"endOfMinute","description":"Return the end of a minute for the given date.","content":{"id":"endOfMinute","longname":"endOfMinute","name":"endOfMinute","kind":"member","scope":"global","description":"Return the end of a minute for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a minute for 1 December 2014 22:15:45.400:\nvar result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a minute"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_minute"},"summary":"Return the end of a minute for the given date.","order":0}},{"type":"jsdoc","urlId":"getMinutes","category":"Minute Helpers","title":"getMinutes","description":"Get the minutes of the given date.","content":{"id":"getMinutes","longname":"getMinutes","name":"getMinutes","kind":"member","scope":"global","description":"Get the minutes of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the minutes of 29 February 2012 11:45:05:\nvar result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n//=> 45"],"returns":[{"type":{"names":["Number"]},"description":"the minutes"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_minutes"},"summary":"Get the minutes of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameMinute","category":"Minute Helpers","title":"isSameMinute","description":"Are the given dates in the same minute?","content":{"id":"isSameMinute","longname":"isSameMinute","name":"isSameMinute","kind":"member","scope":"global","description":"Are the given dates in the same minute?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15\n// in the same minute?\nvar result = isSameMinute(\n new Date(2014, 8, 4, 6, 30),\n new Date(2014, 8, 4, 6, 30, 15)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same minute"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_minute"},"summary":"Are the given dates in the same minute?","order":0}},{"type":"jsdoc","urlId":"setMinutes","category":"Minute Helpers","title":"setMinutes","description":"Set the minutes to the given date.","content":{"id":"setMinutes","longname":"setMinutes","name":"setMinutes","kind":"member","scope":"global","description":"Set the minutes to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the minutes of the new date","name":"minutes"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 45 minutes to 1 September 2014 11:30:40:\nvar result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n//=> Mon Sep 01 2014 11:45:40"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the minutes setted"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_minutes"},"summary":"Set the minutes to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfMinute","category":"Minute Helpers","title":"startOfMinute","description":"Return the start of a minute for the given date.","content":{"id":"startOfMinute","longname":"startOfMinute","name":"startOfMinute","kind":"member","scope":"global","description":"Return the start of a minute for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a minute for 1 December 2014 22:15:45.400:\nvar result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a minute"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_minute"},"summary":"Return the start of a minute for the given date.","order":0}},{"type":"jsdoc","urlId":"subMinutes","category":"Minute Helpers","title":"subMinutes","description":"Subtract the specified number of minutes from the given date.","content":{"id":"subMinutes","longname":"subMinutes","name":"subMinutes","kind":"member","scope":"global","description":"Subtract the specified number of minutes from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of minutes to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 30 minutes from 10 July 2014 12:00:00:\nvar result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n//=> Thu Jul 10 2014 11:30:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the mintues subtracted"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_minutes"},"summary":"Subtract the specified number of minutes from the given date.","order":0}}],"Hour Helpers":[{"type":"jsdoc","urlId":"addHours","category":"Hour Helpers","title":"addHours","description":"Add the specified number of hours to the given date.","content":{"id":"addHours","longname":"addHours","name":"addHours","kind":"member","scope":"global","description":"Add the specified number of hours to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of hours to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 2 hours to 10 July 2014 23:00:00:\nvar result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n//=> Fri Jul 11 2014 01:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the hours added"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_hours"},"summary":"Add the specified number of hours to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInHours","category":"Hour Helpers","title":"differenceInHours","description":"Get the number of hours between the given dates.","content":{"id":"differenceInHours","longname":"differenceInHours","name":"differenceInHours","kind":"member","scope":"global","description":"Get the number of hours between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\nvar result = differenceInHours(\n new Date(2014, 6, 2, 6, 50),\n new Date(2014, 6, 2, 19, 0)\n)\n//=> 12"],"returns":[{"type":{"names":["Number"]},"description":"the number of hours"}],"category":"Hour Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_hours"},"summary":"Get the number of hours between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfHour","category":"Hour Helpers","title":"endOfHour","description":"Return the end of an hour for the given date.","content":{"id":"endOfHour","longname":"endOfHour","name":"endOfHour","kind":"member","scope":"global","description":"Return the end of an hour for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of an hour for 2 September 2014 11:55:00:\nvar result = endOfHour(new Date(2014, 8, 2, 11, 55))\n//=> Tue Sep 02 2014 11:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of an hour"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_hour"},"summary":"Return the end of an hour for the given date.","order":0}},{"type":"jsdoc","urlId":"getHours","category":"Hour Helpers","title":"getHours","description":"Get the hours of the given date.","content":{"id":"getHours","longname":"getHours","name":"getHours","kind":"member","scope":"global","description":"Get the hours of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the hours of 29 February 2012 11:45:00:\nvar result = getHours(new Date(2012, 1, 29, 11, 45))\n//=> 11"],"returns":[{"type":{"names":["Number"]},"description":"the hours"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_hours"},"summary":"Get the hours of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameHour","category":"Hour Helpers","title":"isSameHour","description":"Are the given dates in the same hour?","content":{"id":"isSameHour","longname":"isSameHour","name":"isSameHour","kind":"member","scope":"global","description":"Are the given dates in the same hour?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?\nvar result = isSameHour(\n new Date(2014, 8, 4, 6, 0),\n new Date(2014, 8, 4, 6, 30)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same hour"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_hour"},"summary":"Are the given dates in the same hour?","order":0}},{"type":"jsdoc","urlId":"setHours","category":"Hour Helpers","title":"setHours","description":"Set the hours to the given date.","content":{"id":"setHours","longname":"setHours","name":"setHours","kind":"member","scope":"global","description":"Set the hours to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the hours of the new date","name":"hours"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 4 hours to 1 September 2014 11:30:00:\nvar result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n//=> Mon Sep 01 2014 04:30:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the hours setted"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_hours"},"summary":"Set the hours to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfHour","category":"Hour Helpers","title":"startOfHour","description":"Return the start of an hour for the given date.","content":{"id":"startOfHour","longname":"startOfHour","name":"startOfHour","kind":"member","scope":"global","description":"Return the start of an hour for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of an hour for 2 September 2014 11:55:00:\nvar result = startOfHour(new Date(2014, 8, 2, 11, 55))\n//=> Tue Sep 02 2014 11:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of an hour"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_hour"},"summary":"Return the start of an hour for the given date.","order":0}},{"type":"jsdoc","urlId":"subHours","category":"Hour Helpers","title":"subHours","description":"Subtract the specified number of hours from the given date.","content":{"id":"subHours","longname":"subHours","name":"subHours","kind":"member","scope":"global","description":"Subtract the specified number of hours from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of hours to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 2 hours from 11 July 2014 01:00:00:\nvar result = subHours(new Date(2014, 6, 11, 1, 0), 2)\n//=> Thu Jul 10 2014 23:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the hours subtracted"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_hours"},"summary":"Subtract the specified number of hours from the given date.","order":0}}],"Day Helpers":[{"type":"jsdoc","urlId":"addDays","category":"Day Helpers","title":"addDays","description":"Add the specified number of days to the given date.","content":{"id":"addDays","longname":"addDays","name":"addDays","kind":"member","scope":"global","description":"Add the specified number of days to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of days to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 10 days to 1 September 2014:\nvar result = addDays(new Date(2014, 8, 1), 10)\n//=> Thu Sep 11 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the days added"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_days"},"summary":"Add the specified number of days to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarDays","category":"Day Helpers","title":"differenceInCalendarDays","description":"Get the number of calendar days between the given dates.","content":{"id":"differenceInCalendarDays","longname":"differenceInCalendarDays","name":"differenceInCalendarDays","kind":"member","scope":"global","description":"Get the number of calendar days between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar days are between\n// 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\nvar result = differenceInCalendarDays(\n new Date(2011, 6, 2, 23, 0),\n new Date(2012, 6, 2, 0, 0)\n)\n//=> 366"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar days"}],"category":"Day Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_days"},"summary":"Get the number of calendar days between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInDays","category":"Day Helpers","title":"differenceInDays","description":"Get the number of full days between the given dates.","content":{"id":"differenceInDays","longname":"differenceInDays","name":"differenceInDays","kind":"member","scope":"global","description":"Get the number of full days between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full days are between\n// 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\nvar result = differenceInDays(\n new Date(2011, 6, 2, 23, 0),\n new Date(2012, 6, 2, 0, 0)\n)\n//=> 365"],"returns":[{"type":{"names":["Number"]},"description":"the number of full days"}],"category":"Day Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_days"},"summary":"Get the number of full days between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfDay","category":"Day Helpers","title":"endOfDay","description":"Return the end of a day for the given date.","content":{"id":"endOfDay","longname":"endOfDay","name":"endOfDay","kind":"member","scope":"global","description":"Return the end of a day for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a day for 2 September 2014 11:55:00:\nvar result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 02 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a day"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_day"},"summary":"Return the end of a day for the given date.","order":0}},{"type":"jsdoc","urlId":"getDate","category":"Day Helpers","title":"getDate","description":"Get the day of the month of the given date.","content":{"id":"getDate","longname":"getDate","name":"getDate","kind":"member","scope":"global","description":"Get the day of the month of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the month is 29 February 2012?\nvar result = getDate(new Date(2012, 1, 29))\n//=> 29"],"returns":[{"type":{"names":["Number"]},"description":"the day of month"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_date"},"summary":"Get the day of the month of the given date.","order":0}},{"type":"jsdoc","urlId":"getDayOfYear","category":"Day Helpers","title":"getDayOfYear","description":"Get the day of the year of the given date.","content":{"id":"getDayOfYear","longname":"getDayOfYear","name":"getDayOfYear","kind":"member","scope":"global","description":"Get the day of the year of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the year is 2 July 2014?\nvar result = getDayOfYear(new Date(2014, 6, 2))\n//=> 183"],"returns":[{"type":{"names":["Number"]},"description":"the day of year"}],"category":"Day Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_day_of_year"},"summary":"Get the day of the year of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameDay","category":"Day Helpers","title":"isSameDay","description":"Are the given dates in the same day?","content":{"id":"isSameDay","longname":"isSameDay","name":"isSameDay","kind":"member","scope":"global","description":"Are the given dates in the same day?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\nvar result = isSameDay(\n new Date(2014, 8, 4, 6, 0),\n new Date(2014, 8, 4, 18, 0)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same day"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_day"},"summary":"Are the given dates in the same day?","order":0}},{"type":"jsdoc","urlId":"setDate","category":"Day Helpers","title":"setDate","description":"Set the day of the month to the given date.","content":{"id":"setDate","longname":"setDate","name":"setDate","kind":"member","scope":"global","description":"Set the day of the month to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the month of the new date","name":"dayOfMonth"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 30th day of the month to 1 September 2014:\nvar result = setDate(new Date(2014, 8, 1), 30)\n//=> Tue Sep 30 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the month setted"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_date"},"summary":"Set the day of the month to the given date.","order":0}},{"type":"jsdoc","urlId":"setDayOfYear","category":"Day Helpers","title":"setDayOfYear","description":"Set the day of the year to the given date.","content":{"id":"setDayOfYear","longname":"setDayOfYear","name":"setDayOfYear","kind":"member","scope":"global","description":"Set the day of the year to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the year of the new date","name":"dayOfYear"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 2nd day of the year to 2 July 2014:\nvar result = setDayOfYear(new Date(2014, 6, 2), 2)\n//=> Thu Jan 02 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the year setted"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_day_of_year"},"summary":"Set the day of the year to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfDay","category":"Day Helpers","title":"startOfDay","description":"Return the start of a day for the given date.","content":{"id":"startOfDay","longname":"startOfDay","name":"startOfDay","kind":"member","scope":"global","description":"Return the start of a day for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a day for 2 September 2014 11:55:00:\nvar result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 02 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a day"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_day"},"summary":"Return the start of a day for the given date.","order":0}},{"type":"jsdoc","urlId":"subDays","category":"Day Helpers","title":"subDays","description":"Subtract the specified number of days from the given date.","content":{"id":"subDays","longname":"subDays","name":"subDays","kind":"member","scope":"global","description":"Subtract the specified number of days from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of days to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 10 days from 1 September 2014:\nvar result = subDays(new Date(2014, 8, 1), 10)\n//=> Fri Aug 22 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the days subtracted"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_days"},"summary":"Subtract the specified number of days from the given date.","order":0}}],"Weekday Helpers":[{"type":"jsdoc","urlId":"getDay","category":"Weekday Helpers","title":"getDay","description":"Get the day of the week of the given date.","content":{"id":"getDay","longname":"getDay","name":"getDay","kind":"member","scope":"global","description":"Get the day of the week of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the week is 29 February 2012?\nvar result = getDay(new Date(2012, 1, 29))\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the day of week"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_day"},"summary":"Get the day of the week of the given date.","order":0}},{"type":"jsdoc","urlId":"getISODay","category":"Weekday Helpers","title":"getISODay","description":"Get the day of the ISO week of the given date.","content":{"id":"getISODay","longname":"getISODay","name":"getISODay","kind":"member","scope":"global","description":"Get the day of the ISO week of the given date,\nwhich is 7 for Sunday, 1 for Monday etc.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the ISO week is 26 February 2012?\nvar result = getISODay(new Date(2012, 1, 26))\n//=> 7"],"returns":[{"type":{"names":["Number"]},"description":"the day of ISO week"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_day"},"summary":"Get the day of the ISO week of the given date.","order":0}},{"type":"jsdoc","urlId":"isFriday","category":"Weekday Helpers","title":"isFriday","description":"Is the given date Friday?","content":{"id":"isFriday","longname":"isFriday","name":"isFriday","kind":"member","scope":"global","description":"Is the given date Friday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 26 September 2014 Friday?\nvar result = isFriday(new Date(2014, 8, 26))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Friday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_friday"},"summary":"Is the given date Friday?","order":0}},{"type":"jsdoc","urlId":"isMonday","category":"Weekday Helpers","title":"isMonday","description":"Is the given date Monday?","content":{"id":"isMonday","longname":"isMonday","name":"isMonday","kind":"member","scope":"global","description":"Is the given date Monday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 22 September 2014 Monday?\nvar result = isMonday(new Date(2014, 8, 22))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Monday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_monday"},"summary":"Is the given date Monday?","order":0}},{"type":"jsdoc","urlId":"isSaturday","category":"Weekday Helpers","title":"isSaturday","description":"Is the given date Saturday?","content":{"id":"isSaturday","longname":"isSaturday","name":"isSaturday","kind":"member","scope":"global","description":"Is the given date Saturday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 27 September 2014 Saturday?\nvar result = isSaturday(new Date(2014, 8, 27))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Saturday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_saturday"},"summary":"Is the given date Saturday?","order":0}},{"type":"jsdoc","urlId":"isSunday","category":"Weekday Helpers","title":"isSunday","description":"Is the given date Sunday?","content":{"id":"isSunday","longname":"isSunday","name":"isSunday","kind":"member","scope":"global","description":"Is the given date Sunday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 21 September 2014 Sunday?\nvar result = isSunday(new Date(2014, 8, 21))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Sunday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_sunday"},"summary":"Is the given date Sunday?","order":0}},{"type":"jsdoc","urlId":"isThursday","category":"Weekday Helpers","title":"isThursday","description":"Is the given date Thursday?","content":{"id":"isThursday","longname":"isThursday","name":"isThursday","kind":"member","scope":"global","description":"Is the given date Thursday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 25 September 2014 Thursday?\nvar result = isThursday(new Date(2014, 8, 25))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Thursday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_thursday"},"summary":"Is the given date Thursday?","order":0}},{"type":"jsdoc","urlId":"isTuesday","category":"Weekday Helpers","title":"isTuesday","description":"Is the given date Tuesday?","content":{"id":"isTuesday","longname":"isTuesday","name":"isTuesday","kind":"member","scope":"global","description":"Is the given date Tuesday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 23 September 2014 Tuesday?\nvar result = isTuesday(new Date(2014, 8, 23))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Tuesday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_tuesday"},"summary":"Is the given date Tuesday?","order":0}},{"type":"jsdoc","urlId":"isWednesday","category":"Weekday Helpers","title":"isWednesday","description":"Is the given date Wednesday?","content":{"id":"isWednesday","longname":"isWednesday","name":"isWednesday","kind":"member","scope":"global","description":"Is the given date Wednesday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 24 September 2014 Wednesday?\nvar result = isWednesday(new Date(2014, 8, 24))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Wednesday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_wednesday"},"summary":"Is the given date Wednesday?","order":0}},{"type":"jsdoc","urlId":"isWeekend","category":"Weekday Helpers","title":"isWeekend","description":"Does the given date fall on a weekend?","content":{"id":"isWeekend","longname":"isWeekend","name":"isWeekend","kind":"member","scope":"global","description":"Does the given date fall on a weekend?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Does 5 October 2014 fall on a weekend?\nvar result = isWeekend(new Date(2014, 9, 5))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date falls on a weekend"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_weekend"},"summary":"Does the given date fall on a weekend?","order":0}},{"type":"jsdoc","urlId":"setDay","category":"Weekday Helpers","title":"setDay","description":"Set the day of the week to the given date.","content":{"id":"setDay","longname":"setDay","name":"setDay","kind":"member","scope":"global","description":"Set the day of the week to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the week of the new date","name":"day"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// Set Sunday to 1 September 2014:\nvar result = setDay(new Date(2014, 8, 1), 0)\n//=> Sun Aug 31 2014 00:00:00","// If week starts with Monday, set Sunday to 1 September 2014:\nvar result = setDay(new Date(2014, 8, 1), 0, {weekStartsOn: 1})\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the week setted"}],"category":"Weekday Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_day"},"summary":"Set the day of the week to the given date.","order":0}},{"type":"jsdoc","urlId":"setISODay","category":"Weekday Helpers","title":"setISODay","description":"Set the day of the ISO week to the given date.","content":{"id":"setISODay","longname":"setISODay","name":"setISODay","kind":"member","scope":"global","description":"Set the day of the ISO week to the given date.\nISO week starts with Monday.\n7 is the index of Sunday, 1 is the index of Monday etc.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the ISO week of the new date","name":"day"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set Sunday to 1 September 2014:\nvar result = setISODay(new Date(2014, 8, 1), 7)\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the ISO week setted"}],"category":"Weekday Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_iso_day"},"summary":"Set the day of the ISO week to the given date.","order":0}}],"Week Helpers":[{"type":"jsdoc","urlId":"addWeeks","category":"Week Helpers","title":"addWeeks","description":"Add the specified number of weeks to the given date.","content":{"id":"addWeeks","longname":"addWeeks","name":"addWeeks","kind":"member","scope":"global","description":"Add the specified number of week to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of weeks to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 4 weeks to 1 September 2014:\nvar result = addWeeks(new Date(2014, 8, 1), 4)\n//=> Mon Sep 29 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the weeks added"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_weeks"},"summary":"Add the specified number of weeks to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarWeeks","category":"Week Helpers","title":"differenceInCalendarWeeks","description":"Get the number of calendar weeks between the given dates.","content":{"id":"differenceInCalendarWeeks","longname":"differenceInCalendarWeeks","name":"differenceInCalendarWeeks","kind":"member","scope":"global","description":"Get the number of calendar weeks between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// How many calendar weeks are between 5 July 2014 and 20 July 2014?\nvar result = differenceInCalendarWeeks(\n new Date(2014, 6, 5),\n new Date(2014, 6, 20)\n)\n//=> 3","// If the week starts on Monday,\n// how many calendar weeks are between 5 July 2014 and 20 July 2014?\nvar result = differenceInCalendarWeeks(\n new Date(2014, 6, 5),\n new Date(2014, 6, 20),\n {weekStartsOn: 1}\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar weeks"}],"category":"Week Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_weeks"},"summary":"Get the number of calendar weeks between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInWeeks","category":"Week Helpers","title":"differenceInWeeks","description":"Get the number of full weeks between the given dates.","content":{"id":"differenceInWeeks","longname":"differenceInWeeks","name":"differenceInWeeks","kind":"member","scope":"global","description":"Get the number of full weeks between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full weeks are between 5 July 2014 and 20 July 2014?\nvar result = differenceInWeeks(\n new Date(2014, 6, 5),\n new Date(2014, 6, 20)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of full weeks"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_weeks"},"summary":"Get the number of full weeks between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfWeek","category":"Week Helpers","title":"endOfWeek","description":"Return the end of a week for the given date.","content":{"id":"endOfWeek","longname":"endOfWeek","name":"endOfWeek","kind":"member","scope":"global","description":"Return the end of a week for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// The end of a week for 2 September 2014 11:55:00:\nvar result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sat Sep 06 2014 23:59:59.999","// If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\nvar result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n//=> Sun Sep 07 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_week"},"summary":"Return the end of a week for the given date.","order":0}},{"type":"jsdoc","urlId":"isSameWeek","category":"Week Helpers","title":"isSameWeek","description":"Are the given dates in the same week?","content":{"id":"isSameWeek","longname":"isSameWeek","name":"isSameWeek","kind":"member","scope":"global","description":"Are the given dates in the same week?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// Are 31 August 2014 and 4 September 2014 in the same week?\nvar result = isSameWeek(\n new Date(2014, 7, 31),\n new Date(2014, 8, 4)\n)\n//=> true","// If week starts with Monday,\n// are 31 August 2014 and 4 September 2014 in the same week?\nvar result = isSameWeek(\n new Date(2014, 7, 31),\n new Date(2014, 8, 4),\n {weekStartsOn: 1}\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_week"},"summary":"Are the given dates in the same week?","order":0}},{"type":"jsdoc","urlId":"lastDayOfWeek","category":"Week Helpers","title":"lastDayOfWeek","description":"Return the last day of a week for the given date.","content":{"id":"lastDayOfWeek","longname":"lastDayOfWeek","name":"lastDayOfWeek","kind":"member","scope":"global","description":"Return the last day of a week for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// The last day of a week for 2 September 2014 11:55:00:\nvar result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sat Sep 06 2014 00:00:00","// If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00:\nvar result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_week"},"summary":"Return the last day of a week for the given date.","order":0}},{"type":"jsdoc","urlId":"startOfWeek","category":"Week Helpers","title":"startOfWeek","description":"Return the start of a week for the given date.","content":{"id":"startOfWeek","longname":"startOfWeek","name":"startOfWeek","kind":"member","scope":"global","description":"Return the start of a week for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// The start of a week for 2 September 2014 11:55:00:\nvar result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sun Aug 31 2014 00:00:00","// If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\nvar result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_week"},"summary":"Return the start of a week for the given date.","order":0}},{"type":"jsdoc","urlId":"subWeeks","category":"Week Helpers","title":"subWeeks","description":"Subtract the specified number of weeks from the given date.","content":{"id":"subWeeks","longname":"subWeeks","name":"subWeeks","kind":"member","scope":"global","description":"Subtract the specified number of weeks from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of weeks to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 4 weeks from 1 September 2014:\nvar result = subWeeks(new Date(2014, 8, 1), 4)\n//=> Mon Aug 04 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the weeks subtracted"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_weeks"},"summary":"Subtract the specified number of weeks from the given date.","order":0}}],"ISO Week Helpers":[{"type":"jsdoc","urlId":"differenceInCalendarISOWeeks","category":"ISO Week Helpers","title":"differenceInCalendarISOWeeks","description":"Get the number of calendar ISO weeks between the given dates.","content":{"id":"differenceInCalendarISOWeeks","longname":"differenceInCalendarISOWeeks","name":"differenceInCalendarISOWeeks","kind":"member","scope":"global","description":"Get the number of calendar ISO weeks between the given dates.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?\nvar result = differenceInCalendarISOWeeks(\n new Date(2014, 6, 6),\n new Date(2014, 6, 21)\n)\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar ISO weeks"}],"category":"ISO Week Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_iso_weeks"},"summary":"Get the number of calendar ISO weeks between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfISOWeek","category":"ISO Week Helpers","title":"endOfISOWeek","description":"Return the end of an ISO week for the given date.","content":{"id":"endOfISOWeek","longname":"endOfISOWeek","name":"endOfISOWeek","kind":"member","scope":"global","description":"Return the end of an ISO week for the given date.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of an ISO week for 2 September 2014 11:55:00:\nvar result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sun Sep 07 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of an ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_iso_week"},"summary":"Return the end of an ISO week for the given date.","order":0}},{"type":"jsdoc","urlId":"getISOWeek","category":"ISO Week Helpers","title":"getISOWeek","description":"Get the ISO week of the given date.","content":{"id":"getISOWeek","longname":"getISOWeek","name":"getISOWeek","kind":"member","scope":"global","description":"Get the ISO week of the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which week of the ISO-week numbering year is 2 January 2005?\nvar result = getISOWeek(new Date(2005, 0, 2))\n//=> 53"],"returns":[{"type":{"names":["Number"]},"description":"the ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":7,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_week"},"summary":"Get the ISO week of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameISOWeek","category":"ISO Week Helpers","title":"isSameISOWeek","description":"Are the given dates in the same ISO week?","content":{"id":"isSameISOWeek","longname":"isSameISOWeek","name":"isSameISOWeek","kind":"member","scope":"global","description":"Are the given dates in the same ISO week?\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 1 September 2014 and 7 September 2014 in the same ISO week?\nvar result = isSameISOWeek(\n new Date(2014, 8, 1),\n new Date(2014, 8, 7)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_iso_week"},"summary":"Are the given dates in the same ISO week?","order":0}},{"type":"jsdoc","urlId":"lastDayOfISOWeek","category":"ISO Week Helpers","title":"lastDayOfISOWeek","description":"Return the last day of an ISO week for the given date.","content":{"id":"lastDayOfISOWeek","longname":"lastDayOfISOWeek","name":"lastDayOfISOWeek","kind":"member","scope":"global","description":"Return the last day of an ISO week for the given date.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of an ISO week for 2 September 2014 11:55:00:\nvar result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of an ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_iso_week"},"summary":"Return the last day of an ISO week for the given date.","order":0}},{"type":"jsdoc","urlId":"setISOWeek","category":"ISO Week Helpers","title":"setISOWeek","description":"Set the ISO week to the given date.","content":{"id":"setISOWeek","longname":"setISOWeek","name":"setISOWeek","kind":"member","scope":"global","description":"Set the ISO week to the given date, saving the weekday number.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the ISO week of the new date","name":"isoWeek"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 53rd ISO week to 7 August 2004:\nvar result = setISOWeek(new Date(2004, 7, 7), 53)\n//=> Sat Jan 01 2005 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week setted"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_iso_week"},"summary":"Set the ISO week to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfISOWeek","category":"ISO Week Helpers","title":"startOfISOWeek","description":"Return the start of an ISO week for the given date.","content":{"id":"startOfISOWeek","longname":"startOfISOWeek","name":"startOfISOWeek","kind":"member","scope":"global","description":"Return the start of an ISO week for the given date.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of an ISO week for 2 September 2014 11:55:00:\nvar result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of an ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_iso_week"},"summary":"Return the start of an ISO week for the given date.","order":0}}],"Month Helpers":[{"type":"jsdoc","urlId":"addMonths","category":"Month Helpers","title":"addMonths","description":"Add the specified number of months to the given date.","content":{"id":"addMonths","longname":"addMonths","name":"addMonths","kind":"member","scope":"global","description":"Add the specified number of months to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of months to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 5 months to 1 September 2014:\nvar result = addMonths(new Date(2014, 8, 1), 5)\n//=> Sun Feb 01 2015 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the months added"}],"category":"Month Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_months"},"summary":"Add the specified number of months to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarMonths","category":"Month Helpers","title":"differenceInCalendarMonths","description":"Get the number of calendar months between the given dates.","content":{"id":"differenceInCalendarMonths","longname":"differenceInCalendarMonths","name":"differenceInCalendarMonths","kind":"member","scope":"global","description":"Get the number of calendar months between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar months are between 31 January 2014 and 1 September 2014?\nvar result = differenceInCalendarMonths(\n new Date(2014, 0, 31),\n new Date(2014, 8, 1)\n)\n//=> 8"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar months"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_months"},"summary":"Get the number of calendar months between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInMonths","category":"Month Helpers","title":"differenceInMonths","description":"Get the number of full months between the given dates.","content":{"id":"differenceInMonths","longname":"differenceInMonths","name":"differenceInMonths","kind":"member","scope":"global","description":"Get the number of full months between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full months are between 31 January 2014 and 1 September 2014?\nvar result = differenceInMonths(\n new Date(2014, 0, 31),\n new Date(2014, 8, 1)\n)\n//=> 7"],"returns":[{"type":{"names":["Number"]},"description":"the number of full months"}],"category":"Month Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_months"},"summary":"Get the number of full months between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfMonth","category":"Month Helpers","title":"endOfMonth","description":"Return the end of a month for the given date.","content":{"id":"endOfMonth","longname":"endOfMonth","name":"endOfMonth","kind":"member","scope":"global","description":"Return the end of a month for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a month for 2 September 2014 11:55:00:\nvar result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_month"},"summary":"Return the end of a month for the given date.","order":0}},{"type":"jsdoc","urlId":"getDaysInMonth","category":"Month Helpers","title":"getDaysInMonth","description":"Get the number of days in a month of the given date.","content":{"id":"getDaysInMonth","longname":"getDaysInMonth","name":"getDaysInMonth","kind":"member","scope":"global","description":"Get the number of days in a month of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many days are in February 2000?\nvar result = getDaysInMonth(new Date(2000, 1))\n//=> 29"],"returns":[{"type":{"names":["Number"]},"description":"the number of days in a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_days_in_month"},"summary":"Get the number of days in a month of the given date.","order":0}},{"type":"jsdoc","urlId":"getMonth","category":"Month Helpers","title":"getMonth","description":"Get the month of the given date.","content":{"id":"getMonth","longname":"getMonth","name":"getMonth","kind":"member","scope":"global","description":"Get the month of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which month is 29 February 2012?\nvar result = getMonth(new Date(2012, 1, 29))\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"the month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_month"},"summary":"Get the month of the given date.","order":0}},{"type":"jsdoc","urlId":"isFirstDayOfMonth","category":"Month Helpers","title":"isFirstDayOfMonth","description":"Is the given date the first day of a month?","content":{"id":"isFirstDayOfMonth","longname":"isFirstDayOfMonth","name":"isFirstDayOfMonth","kind":"member","scope":"global","description":"Is the given date the first day of a month?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 1 September 2014 the first day of a month?\nvar result = isFirstDayOfMonth(new Date(2014, 8, 1))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is the first day of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_first_day_of_month"},"summary":"Is the given date the first day of a month?","order":0}},{"type":"jsdoc","urlId":"isLastDayOfMonth","category":"Month Helpers","title":"isLastDayOfMonth","description":"Is the given date the last day of a month?","content":{"id":"isLastDayOfMonth","longname":"isLastDayOfMonth","name":"isLastDayOfMonth","kind":"member","scope":"global","description":"Is the given date the last day of a month?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 28 February 2014 the last day of a month?\nvar result = isLastDayOfMonth(new Date(2014, 1, 28))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is the last day of a month"}],"category":"Month Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_last_day_of_month"},"summary":"Is the given date the last day of a month?","order":0}},{"type":"jsdoc","urlId":"isSameMonth","category":"Month Helpers","title":"isSameMonth","description":"Are the given dates in the same month?","content":{"id":"isSameMonth","longname":"isSameMonth","name":"isSameMonth","kind":"member","scope":"global","description":"Are the given dates in the same month?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 2 September 2014 and 25 September 2014 in the same month?\nvar result = isSameMonth(\n new Date(2014, 8, 2),\n new Date(2014, 8, 25)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_month"},"summary":"Are the given dates in the same month?","order":0}},{"type":"jsdoc","urlId":"lastDayOfMonth","category":"Month Helpers","title":"lastDayOfMonth","description":"Return the last day of a month for the given date.","content":{"id":"lastDayOfMonth","longname":"lastDayOfMonth","name":"lastDayOfMonth","kind":"member","scope":"global","description":"Return the last day of a month for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of a month for 2 September 2014 11:55:00:\nvar result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_month"},"summary":"Return the last day of a month for the given date.","order":0}},{"type":"jsdoc","urlId":"setMonth","category":"Month Helpers","title":"setMonth","description":"Set the month to the given date.","content":{"id":"setMonth","longname":"setMonth","name":"setMonth","kind":"member","scope":"global","description":"Set the month to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the month of the new date","name":"month"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set February to 1 September 2014:\nvar result = setMonth(new Date(2014, 8, 1), 1)\n//=> Sat Feb 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the month setted"}],"category":"Month Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_month"},"summary":"Set the month to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfMonth","category":"Month Helpers","title":"startOfMonth","description":"Return the start of a month for the given date.","content":{"id":"startOfMonth","longname":"startOfMonth","name":"startOfMonth","kind":"member","scope":"global","description":"Return the start of a month for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a month for 2 September 2014 11:55:00:\nvar result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_month"},"summary":"Return the start of a month for the given date.","order":0}},{"type":"jsdoc","urlId":"subMonths","category":"Month Helpers","title":"subMonths","description":"Subtract the specified number of months from the given date.","content":{"id":"subMonths","longname":"subMonths","name":"subMonths","kind":"member","scope":"global","description":"Subtract the specified number of months from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of months to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 5 months from 1 February 2015:\nvar result = subMonths(new Date(2015, 1, 1), 5)\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the months subtracted"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_months"},"summary":"Subtract the specified number of months from the given date.","order":0}}],"Quarter Helpers":[{"type":"jsdoc","urlId":"addQuarters","category":"Quarter Helpers","title":"addQuarters","description":"Add the specified number of year quarters to the given date.","content":{"id":"addQuarters","longname":"addQuarters","name":"addQuarters","kind":"member","scope":"global","description":"Add the specified number of year quarters to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of quarters to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 1 quarter to 1 September 2014:\nvar result = addQuarters(new Date(2014, 8, 1), 1)\n//=> Mon Dec 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the quarters added"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_quarters"},"summary":"Add the specified number of year quarters to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarQuarters","category":"Quarter Helpers","title":"differenceInCalendarQuarters","description":"Get the number of calendar quarters between the given dates.","content":{"id":"differenceInCalendarQuarters","longname":"differenceInCalendarQuarters","name":"differenceInCalendarQuarters","kind":"member","scope":"global","description":"Get the number of calendar quarters between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar quarters are between 31 December 2013 and 2 July 2014?\nvar result = differenceInCalendarQuarters(\n new Date(2013, 11, 31),\n new Date(2014, 6, 2)\n)\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar quarters"}],"category":"Quarter Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_quarters"},"summary":"Get the number of calendar quarters between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInQuarters","category":"Quarter Helpers","title":"differenceInQuarters","description":"Get the number of full quarters between the given dates.","content":{"id":"differenceInQuarters","longname":"differenceInQuarters","name":"differenceInQuarters","kind":"member","scope":"global","description":"Get the number of full quarters between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full quarters are between 31 December 2013 and 2 July 2014?\nvar result = differenceInQuarters(\n new Date(2013, 11, 31),\n new Date(2014, 6, 2)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of full quarters"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_quarters"},"summary":"Get the number of full quarters between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfQuarter","category":"Quarter Helpers","title":"endOfQuarter","description":"Return the end of a year quarter for the given date.","content":{"id":"endOfQuarter","longname":"endOfQuarter","name":"endOfQuarter","kind":"member","scope":"global","description":"Return the end of a year quarter for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a quarter for 2 September 2014 11:55:00:\nvar result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_quarter"},"summary":"Return the end of a year quarter for the given date.","order":0}},{"type":"jsdoc","urlId":"getQuarter","category":"Quarter Helpers","title":"getQuarter","description":"Get the year quarter of the given date.","content":{"id":"getQuarter","longname":"getQuarter","name":"getQuarter","kind":"member","scope":"global","description":"Get the year quarter of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which quarter is 2 July 2014?\nvar result = getQuarter(new Date(2014, 6, 2))\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_quarter"},"summary":"Get the year quarter of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameQuarter","category":"Quarter Helpers","title":"isSameQuarter","description":"Are the given dates in the same year quarter?","content":{"id":"isSameQuarter","longname":"isSameQuarter","name":"isSameQuarter","kind":"member","scope":"global","description":"Are the given dates in the same year quarter?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 1 January 2014 and 8 March 2014 in the same quarter?\nvar result = isSameQuarter(\n new Date(2014, 0, 1),\n new Date(2014, 2, 8)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_quarter"},"summary":"Are the given dates in the same year quarter?","order":0}},{"type":"jsdoc","urlId":"lastDayOfQuarter","category":"Quarter Helpers","title":"lastDayOfQuarter","description":"Return the last day of a year quarter for the given date.","content":{"id":"lastDayOfQuarter","longname":"lastDayOfQuarter","name":"lastDayOfQuarter","kind":"member","scope":"global","description":"Return the last day of a year quarter for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of a quarter for 2 September 2014 11:55:00:\nvar result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_quarter"},"summary":"Return the last day of a year quarter for the given date.","order":0}},{"type":"jsdoc","urlId":"setQuarter","category":"Quarter Helpers","title":"setQuarter","description":"Set the year quarter to the given date.","content":{"id":"setQuarter","longname":"setQuarter","name":"setQuarter","kind":"member","scope":"global","description":"Set the year quarter to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the quarter of the new date","name":"quarter"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 2nd quarter to 2 July 2014:\nvar result = setQuarter(new Date(2014, 6, 2), 2)\n//=> Wed Apr 02 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the quarter setted"}],"category":"Quarter Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_quarter"},"summary":"Set the year quarter to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfQuarter","category":"Quarter Helpers","title":"startOfQuarter","description":"Return the start of a year quarter for the given date.","content":{"id":"startOfQuarter","longname":"startOfQuarter","name":"startOfQuarter","kind":"member","scope":"global","description":"Return the start of a year quarter for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a quarter for 2 September 2014 11:55:00:\nvar result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Jul 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_quarter"},"summary":"Return the start of a year quarter for the given date.","order":0}},{"type":"jsdoc","urlId":"subQuarters","category":"Quarter Helpers","title":"subQuarters","description":"Subtract the specified number of year quarters from the given date.","content":{"id":"subQuarters","longname":"subQuarters","name":"subQuarters","kind":"member","scope":"global","description":"Subtract the specified number of year quarters from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of quarters to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 3 quarters from 1 September 2014:\nvar result = subQuarters(new Date(2014, 8, 1), 3)\n//=> Sun Dec 01 2013 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the quarters subtracted"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_quarters"},"summary":"Subtract the specified number of year quarters from the given date.","order":0}}],"Year Helpers":[{"type":"jsdoc","urlId":"addYears","category":"Year Helpers","title":"addYears","description":"Add the specified number of years to the given date.","content":{"id":"addYears","longname":"addYears","name":"addYears","kind":"member","scope":"global","description":"Add the specified number of years to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of years to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 5 years to 1 September 2014:\nvar result = addYears(new Date(2014, 8, 1), 5)\n//=> Sun Sep 01 2019 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the years added"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_years"},"summary":"Add the specified number of years to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarYears","category":"Year Helpers","title":"differenceInCalendarYears","description":"Get the number of calendar years between the given dates.","content":{"id":"differenceInCalendarYears","longname":"differenceInCalendarYears","name":"differenceInCalendarYears","kind":"member","scope":"global","description":"Get the number of calendar years between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar years are between 31 December 2013 and 11 February 2015?\nvar result = differenceInCalendarYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar years"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_years"},"summary":"Get the number of calendar years between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInYears","category":"Year Helpers","title":"differenceInYears","description":"Get the number of full years between the given dates.","content":{"id":"differenceInYears","longname":"differenceInYears","name":"differenceInYears","kind":"member","scope":"global","description":"Get the number of full years between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full years are between 31 December 2013 and 11 February 2015?\nvar result = differenceInYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n)\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"the number of full years"}],"category":"Year Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_years"},"summary":"Get the number of full years between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfYear","category":"Year Helpers","title":"endOfYear","description":"Return the end of a year for the given date.","content":{"id":"endOfYear","longname":"endOfYear","name":"endOfYear","kind":"member","scope":"global","description":"Return the end of a year for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a year for 2 September 2014 11:55:00:\nvar result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n//=> Wed Dec 31 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_year"},"summary":"Return the end of a year for the given date.","order":0}},{"type":"jsdoc","urlId":"getDaysInYear","category":"Year Helpers","title":"getDaysInYear","description":"Get the number of days in a year of the given date.","content":{"id":"getDaysInYear","longname":"getDaysInYear","name":"getDaysInYear","kind":"member","scope":"global","description":"Get the number of days in a year of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many days are in 2012?\nvar result = getDaysInYear(new Date(2012, 0, 1))\n//=> 366"],"returns":[{"type":{"names":["Number"]},"description":"the number of days in a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_days_in_year"},"summary":"Get the number of days in a year of the given date.","order":0}},{"type":"jsdoc","urlId":"getYear","category":"Year Helpers","title":"getYear","description":"Get the year of the given date.","content":{"id":"getYear","longname":"getYear","name":"getYear","kind":"member","scope":"global","description":"Get the year of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which year is 2 July 2014?\nvar result = getYear(new Date(2014, 6, 2))\n//=> 2014"],"returns":[{"type":{"names":["Number"]},"description":"the year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_year"},"summary":"Get the year of the given date.","order":0}},{"type":"jsdoc","urlId":"isLeapYear","category":"Year Helpers","title":"isLeapYear","description":"Is the given date in the leap year?","content":{"id":"isLeapYear","longname":"isLeapYear","name":"isLeapYear","kind":"member","scope":"global","description":"Is the given date in the leap year?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 1 September 2012 in the leap year?\nvar result = isLeapYear(new Date(2012, 8, 1))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is in the leap year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_leap_year"},"summary":"Is the given date in the leap year?","order":0}},{"type":"jsdoc","urlId":"isSameYear","category":"Year Helpers","title":"isSameYear","description":"Are the given dates in the same year?","content":{"id":"isSameYear","longname":"isSameYear","name":"isSameYear","kind":"member","scope":"global","description":"Are the given dates in the same year?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 2 September 2014 and 25 September 2014 in the same year?\nvar result = isSameYear(\n new Date(2014, 8, 2),\n new Date(2014, 8, 25)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_year"},"summary":"Are the given dates in the same year?","order":0}},{"type":"jsdoc","urlId":"lastDayOfYear","category":"Year Helpers","title":"lastDayOfYear","description":"Return the last day of a year for the given date.","content":{"id":"lastDayOfYear","longname":"lastDayOfYear","name":"lastDayOfYear","kind":"member","scope":"global","description":"Return the last day of a year for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of a year for 2 September 2014 11:55:00:\nvar result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00))\n//=> Wed Dec 31 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_year"},"summary":"Return the last day of a year for the given date.","order":0}},{"type":"jsdoc","urlId":"setYear","category":"Year Helpers","title":"setYear","description":"Set the year to the given date.","content":{"id":"setYear","longname":"setYear","name":"setYear","kind":"member","scope":"global","description":"Set the year to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the year of the new date","name":"year"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set year 2013 to 1 September 2014:\nvar result = setYear(new Date(2014, 8, 1), 2013)\n//=> Sun Sep 01 2013 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the year setted"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_year"},"summary":"Set the year to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfYear","category":"Year Helpers","title":"startOfYear","description":"Return the start of a year for the given date.","content":{"id":"startOfYear","longname":"startOfYear","name":"startOfYear","kind":"member","scope":"global","description":"Return the start of a year for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a year for 2 September 2014 11:55:00:\nvar result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n//=> Wed Jan 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_year"},"summary":"Return the start of a year for the given date.","order":0}},{"type":"jsdoc","urlId":"subYears","category":"Year Helpers","title":"subYears","description":"Subtract the specified number of years from the given date.","content":{"id":"subYears","longname":"subYears","name":"subYears","kind":"member","scope":"global","description":"Subtract the specified number of years from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of years to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 5 years from 1 September 2014:\nvar result = subYears(new Date(2014, 8, 1), 5)\n//=> Tue Sep 01 2009 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the years subtracted"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_years"},"summary":"Subtract the specified number of years from the given date.","order":0}}],"ISO Week-Numbering Year Helpers":[{"type":"jsdoc","urlId":"addISOYears","category":"ISO Week-Numbering Year Helpers","title":"addISOYears","description":"Add the specified number of ISO week-numbering years to the given date.","content":{"id":"addISOYears","longname":"addISOYears","name":"addISOYears","kind":"member","scope":"global","description":"Add the specified number of ISO week-numbering years to the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of ISO week-numbering years to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 5 ISO week-numbering years to 2 July 2010:\nvar result = addISOYears(new Date(2010, 6, 2), 5)\n//=> Fri Jun 26 2015 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week-numbering years added"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_iso_years"},"summary":"Add the specified number of ISO week-numbering years to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarISOYears","category":"ISO Week-Numbering Year Helpers","title":"differenceInCalendarISOYears","description":"Get the number of calendar ISO week-numbering years between the given dates.","content":{"id":"differenceInCalendarISOYears","longname":"differenceInCalendarISOYears","name":"differenceInCalendarISOYears","kind":"member","scope":"global","description":"Get the number of calendar ISO week-numbering years between the given dates.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?\nvar result = differenceInCalendarISOYears(\n new Date(2010, 0, 1),\n new Date(2012, 0, 1)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar ISO week-numbering years"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_iso_years"},"summary":"Get the number of calendar ISO week-numbering years between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInISOYears","category":"ISO Week-Numbering Year Helpers","title":"differenceInISOYears","description":"Get the number of full ISO week-numbering years between the given dates.","content":{"id":"differenceInISOYears","longname":"differenceInISOYears","name":"differenceInISOYears","kind":"member","scope":"global","description":"Get the number of full ISO week-numbering years between the given dates.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?\nvar result = differenceInISOYears(\n new Date(2010, 0, 1),\n new Date(2012, 0, 1)\n)\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"the number of full ISO week-numbering years"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_iso_years"},"summary":"Get the number of full ISO week-numbering years between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfISOYear","category":"ISO Week-Numbering Year Helpers","title":"endOfISOYear","description":"Return the end of an ISO week-numbering year for the given date.","content":{"id":"endOfISOYear","longname":"endOfISOYear","name":"endOfISOYear","kind":"member","scope":"global","description":"Return the end of an ISO week-numbering year,\nwhich always starts 3 days before the year's first Thursday.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of an ISO week-numbering year for 2 July 2005:\nvar result = endOfISOYear(new Date(2005, 6, 2))\n//=> Sun Jan 01 2006 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of an ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_iso_year"},"summary":"Return the end of an ISO week-numbering year for the given date.","order":0}},{"type":"jsdoc","urlId":"getISOWeeksInYear","category":"ISO Week-Numbering Year Helpers","title":"getISOWeeksInYear","description":"Get the number of weeks in an ISO week-numbering year of the given date.","content":{"id":"getISOWeeksInYear","longname":"getISOWeeksInYear","name":"getISOWeeksInYear","kind":"member","scope":"global","description":"Get the number of weeks in an ISO week-numbering year of the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many weeks are in ISO week-numbering year 2015?\nvar result = getISOWeeksInYear(new Date(2015, 1, 11))\n//=> 53"],"returns":[{"type":{"names":["Number"]},"description":"the number of ISO weeks in a year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_weeks_in_year"},"summary":"Get the number of weeks in an ISO week-numbering year of the given date.","order":0}},{"type":"jsdoc","urlId":"getISOYear","category":"ISO Week-Numbering Year Helpers","title":"getISOYear","description":"Get the ISO week-numbering year of the given date.","content":{"id":"getISOYear","longname":"getISOYear","name":"getISOYear","kind":"member","scope":"global","description":"Get the ISO week-numbering year of the given date,\nwhich always starts 3 days before the year's first Thursday.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which ISO-week numbering year is 2 January 2005?\nvar result = getISOYear(new Date(2005, 0, 2))\n//=> 2004"],"returns":[{"type":{"names":["Number"]},"description":"the ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_year"},"summary":"Get the ISO week-numbering year of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameISOYear","category":"ISO Week-Numbering Year Helpers","title":"isSameISOYear","description":"Are the given dates in the same ISO week-numbering year?","content":{"id":"isSameISOYear","longname":"isSameISOYear","name":"isSameISOYear","kind":"member","scope":"global","description":"Are the given dates in the same ISO week-numbering year?\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?\nvar result = isSameISOYear(\n new Date(2003, 11, 29),\n new Date(2005, 0, 2)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_iso_year"},"summary":"Are the given dates in the same ISO week-numbering year?","order":0}},{"type":"jsdoc","urlId":"lastDayOfISOYear","category":"ISO Week-Numbering Year Helpers","title":"lastDayOfISOYear","description":"Return the last day of an ISO week-numbering year for the given date.","content":{"id":"lastDayOfISOYear","longname":"lastDayOfISOYear","name":"lastDayOfISOYear","kind":"member","scope":"global","description":"Return the last day of an ISO week-numbering year,\nwhich always starts 3 days before the year's first Thursday.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of an ISO week-numbering year for 2 July 2005:\nvar result = lastDayOfISOYear(new Date(2005, 6, 2))\n//=> Sun Jan 01 2006 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the end of an ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_iso_year"},"summary":"Return the last day of an ISO week-numbering year for the given date.","order":0}},{"type":"jsdoc","urlId":"setISOYear","category":"ISO Week-Numbering Year Helpers","title":"setISOYear","description":"Set the ISO week-numbering year to the given date.","content":{"id":"setISOYear","longname":"setISOYear","name":"setISOYear","kind":"member","scope":"global","description":"Set the ISO week-numbering year to the given date,\nsaving the week number and the weekday number.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the ISO week-numbering year of the new date","name":"isoYear"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set ISO week-numbering year 2007 to 29 December 2008:\nvar result = setISOYear(new Date(2008, 11, 29), 2007)\n//=> Mon Jan 01 2007 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week-numbering year setted"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_iso_year"},"summary":"Set the ISO week-numbering year to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfISOYear","category":"ISO Week-Numbering Year Helpers","title":"startOfISOYear","description":"Return the start of an ISO week-numbering year for the given date.","content":{"id":"startOfISOYear","longname":"startOfISOYear","name":"startOfISOYear","kind":"member","scope":"global","description":"Return the start of an ISO week-numbering year,\nwhich always starts 3 days before the year's first Thursday.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of an ISO week-numbering year for 2 July 2005:\nvar result = startOfISOYear(new Date(2005, 6, 2))\n//=> Mon Jan 03 2005 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of an ISO year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_iso_year"},"summary":"Return the start of an ISO week-numbering year for the given date.","order":0}},{"type":"jsdoc","urlId":"subISOYears","category":"ISO Week-Numbering Year Helpers","title":"subISOYears","description":"Subtract the specified number of ISO week-numbering years from the given date.","content":{"id":"subISOYears","longname":"subISOYears","name":"subISOYears","kind":"member","scope":"global","description":"Subtract the specified number of ISO week-numbering years from the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of ISO week-numbering years to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 5 ISO week-numbering years from 1 September 2014:\nvar result = subISOYears(new Date(2014, 8, 1), 5)\n//=> Mon Aug 31 2009 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week-numbering years subtracted"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_iso_years"},"summary":"Subtract the specified number of ISO week-numbering years from the given date.","order":0}}]} \ No newline at end of file +{"General":[{"content":"# Getting Started\n\n## Table of Contents\n\n- [Introduction](#introduction)\n\n- [Installation](#installation)\n\n - [npm or yarn](#npm)\n\n - [Bower](#bower)\n\n - [CDN & Download](#cdn)\n\n - [GitHub Releases](#github-releases)\n\n## Introduction\n\n**date-fns** provides the most comprehensive, yet simple and consistent toolset\nfor manipulating **JavaScript dates** in **a browser** & **Node.js**.\n\n**date-fns** is like [lodash](https://lodash.com) for dates. It has\n[**140+ functions** for all occasions](https://date-fns.org/docs/).\n\n```js\ndateFns.format(new Date(2014, 1, 11), 'MM/DD/YYYY')\n//=> '02/11/2014'\n\nvar dates = [new Date(1995, 6, 2), new Date(1987, 1, 11), new Date(1989, 6, 10)]\ndates.sort(dateFns.compareAsc)\n//=> [\n// Wed Feb 11 1987 00:00:00,\n// Mon Jul 10 1989 00:00:00,\n// Sun Jul 02 1995 00:00:00\n// ]\n```\n\n## Installation\n\nThe library is available as an [npm package](https://www.npmjs.com/package/date-fns),\na Bower package, and is also distributed through a [CDN](http://cdn.date-fns.org/).\n\n### npm\n\nTo install the npm package, run:\n\n```bash\nnpm install date-fns --save\n#or\nyarn add date-fns\n```\n\nTo start using:\n\n```js\nvar isToday = require('date-fns/is_today')\nisToday(new Date())\n//=> true\n```\n\n### Bower\n\nTo install the Bower package, run:\n\n```bash\nbower install date-fns\n```\n\nTo start using it, add the library to your build and access it\nvia `window.dateFns`:\n\n```js\ndateFns.isToday(new Date())\n//=> true\n```\n\n### CDN\n\nTo start using date-fns, simply add the following code into HTML:\n\n```html\n\n\n```\n\nReplace `VERSION` with a proper version number e.g. `v1.0.0`.\n\nSee the [full list](http://cdn.date-fns.org/) of resources available on the CDN:\n\n- `http://cdn.date-fns.org/VERSION/date_fns.js`\n- `http://cdn.date-fns.org/VERSION/date_fns.js.map`\n- `http://cdn.date-fns.org/VERSION/date_fns.min.js`\n- `http://cdn.date-fns.org/VERSION/date_fns.min.js.map`\n- `http://cdn.date-fns.org/VERSION/date_fns_docs.json`\n\n### GitHub Releases\n\ndate-fns is available via [the releases page](https://github.com/date-fns/date-fns/releases)\nwhere you can download the source code or individual files.\n","type":"markdown","urlId":"Getting-Started","category":"General","title":"Getting Started","description":"Introduction & installation instructions","path":"/Users/lesha/Work/date-fns/docs/getting_started.md"},{"content":"# Change Log\n\nAll notable changes to this project will be documented in this file.\nThis project adheres to [Semantic Versioning].\n\nThis change log follows the format documented in [Keep a CHANGELOG].\n\n[Semantic Versioning]: http://semver.org/\n[Keep a CHANGELOG]: http://keepachangelog.com/\n\n## [Unreleased]\n\n### Added\n\n- FP functions like those in [lodash](https://github.com/lodash/lodash/wiki/FP-Guide),\n that support [currying](https://en.wikipedia.org/wiki/Currying), and, as a consequence,\n functional-style [function composing](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba)).\n\n Each non-FP function has two FP counterparts: one that has [Options](docs/Options) object as its first argument\n and one that hasn't. The name of the former has `WithOptions` added to the end of its name.\n\n In FP functions, the order of arguments is reversed.\n\n See [FP Guide](docs/fp) for more information.\n\n ```javascript\n import addYears from 'date-fns/fp/addYears'\n import formatWithOptions from 'date-fns/fp/formatWithOptions'\n import eoLocale from 'date-fns/locale/eo'\n\n // If FP function has not recieved enough arguments, it returns another function\n const addFiveYears = addYears(5)\n\n // Several arguments can be curried at once\n const dateToString = formatWithOptions({locale: eoLocale}, 'D MMMM YYYY')\n\n const dates = [\n new Date(2017, 0 /* Jan */, 1),\n new Date(2017, 1 /* Feb */, 11),\n new Date(2017, 6 /* Jul */, 2)\n ]\n\n const formattedDates = dates.map((date) => dateToString(addFiveYears(date)))\n //=> ['1 januaro 2022', '11 februaro 2022', '2 julio 2022']\n ```\n\n- Added support for [ECMAScript Modules](http://www.ecma-international.org/ecma-262/6.0/#sec-modules)\n via `'date-fns/esm'` subpackage.\n\n It allows usage with bundlers that support tree-shaking,\n like [rollup.js](http://rollupjs.org) and [webpack](https://webpack.js.org):\n\n ```javascript\n // Without tree-shaking:\n import format from 'date-fns/format'\n import parse from 'date-fns/parse'\n\n // With tree-shaking:\n import {format, parse} from 'date-fns/esm'\n ```\n\n Also, as `'date-fns/esm'` function submodules provide default export,\n they can be used with TypeScript to import functions in more idiomatic way:\n\n ```typescript\n // In TypeScript,\n import * as format from 'date-fns/format'\n\n // is same as:\n import format from 'date-fns/esm/format'\n ```\n\n### Changed\n\n- **BREAKING**: min and max functions now accept an array of dates\n rather than spread arguments.\n\n ```javascript\n // Before v2.0.0\n var date1 = new Date(1989, 6 /* Jul */, 10)\n var date2 = new Date(1987, 1 /* Feb */, 11)\n\n var minDate = min(date1, date2)\n var maxDate = max(date1, date2)\n\n // v2.0.0 onward\n var dates = [new Date(1989, 6 /* Jul */, 10), new Date(1987, 1 /* Feb */, 11)]\n\n var minDate = min(dates)\n var maxDate = max(dates)\n ```\n\n- **BREAKING**: remove all functions that create the current date internally:\n\n - `distanceInWordsToNow`\n - `isFuture`\n - `isPast`\n - `endOfToday`\n - `endOfTomorrow`\n - `endOfYesterday`\n - `startOfToday`\n - `startOfTomorrow`\n - `startOfYesterday`\n - `isToday`\n - `isTomorrow`\n - `isYesterday`\n - `isThisSecond`\n - `isThisMinute`\n - `isThisHour`\n - `isThisWeek`\n - `isThisISOWeek`\n - `isThisMonth`\n - `isThisQuarter`\n - `isThisYear`\n - `isThisISOYear`\n\n These functions are not pure, cannot have FP-versions [#253](https://github.com/date-fns/date-fns/issues/253)\n and would add extra code for UTC-versions [#376](https://github.com/date-fns/date-fns/issues/376).\n\n See issue: [#377](https://github.com/date-fns/date-fns/issues/377)\n\n ```javascript\n // Before v2.0.0\n var result = endOfToday()\n\n // v2.0.0 onward\n var result = endOfDay(new Date())\n ```\n\n Upgrade guide:\n\n - `distanceInWordsToNow(date)` → `distanceInWords(new Date(), date)`\n - `isFuture(date)` → `isAfter(date, new Date())`\n - `isPast(date)` → `isBefore(date, new Date())`\n - `endOfToday()` → `endOfDay(new Date())`\n - `endOfTomorrow()` → `endOfDay(addDays(new Date(), 1))`\n - `endOfYesterday()` → `endOfDay(subDays(new Date(), 1))`\n - `startOfToday()` → `startOfDay(new Date())`\n - `startOfTomorrow()` → `startOfDay(addDays(new Date(), 1))`\n - `startOfYesterday()` → `startOfDay(subDays(new Date(), 1))`\n - `isToday(date)` → `isSameDay(new Date(), date)`\n - `isTomorrow(date)` → `isSameDay(date, addDays(new Date(), 1))`\n - `isYesterday(date)` → `isSameDay(date, subDays(new Date(), 1))`\n - `isThisSecond(date)` → `isSameSecond(date, new Date())`\n - `isThisMinute(date)` → `isSameMinute(date, new Date())`\n - `isThisHour(date)` → `isSameHour(date, new Date())`\n - `isThisWeek(date)` → `isSameWeek(date, new Date())`\n - `isThisISOWeek(date)` → `isSameISOWeek(date, new Date())`\n - `isThisMonth(date)` → `isSameMonth(date, new Date())`\n - `isThisQuarter(date)` → `isSameQuarter(date, new Date())`\n - `isThisYear(date)` → `isSameYear(date, new Date())`\n - `isThisISOYear(date)` → `isSameISOYear(date, new Date())`\n\n- **BREAKING**: make the second argument of `format` non-optional in favor of explicitness.\n\n ```javascript\n // Before v2.0.0\n format(new Date(2016, 0, 1))\n\n // v2.0.0 onward\n format(new Date(2016, 0, 1), 'YYYY-MM-DDTHH:mm:ss.SSSZ')\n ```\n\n- **BREAKING**: functions renamed:\n\n - `areRangesOverlapping` → `areIntervalsOverlapping`\n - `eachDay` → `eachDayOfInterval`\n - `getOverlappingDaysInRanges` → `getOverlappingDaysInIntervals`\n - `isWithinRange` → `isWithinInterval`\n\n This change was made to mirror the use of word \"interval\" in standard ISO 8601:2004 terminology:\n\n ```\n 2.1.3\n time interval\n part of the time axis limited by two instants\n ```\n\n Also these functions now accept an object with `start` and `end` properties\n instead of two arguments as an interval. All these functions, as before,\n throw an exception if the start of the interval is after its end.\n\n ```javascript\n // Before v2.0.0\n\n areRangesOverlapping(\n new Date(2014, 0, 10), new Date(2014, 0, 20),\n new Date(2014, 0, 17), new Date(2014, 0, 21)\n )\n\n eachDay(new Date(2014, 0, 10), new Date(2014, 0, 20))\n\n getOverlappingDaysInRanges(\n new Date(2014, 0, 10), new Date(2014, 0, 20),\n new Date(2014, 0, 17), new Date(2014, 0, 21)\n )\n\n isWithinRange(\n new Date(2014, 0, 3),\n new Date(2014, 0, 1), new Date(2014, 0, 7)\n )\n\n // v2.0.0 onward\n\n areIntervalsOverlapping(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n )\n\n eachDayOfInterval({start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)})\n\n getOverlappingDaysInIntervals(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n )\n\n isWithinInterval(\n new Date(2014, 0, 3),\n {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)}\n )\n ```\n\n- **BREAKING**: `parse` renamed to `toDate`,\n created a new function `parse` which parses a string using a provided format.\n\n ```javascript\n // Before v2.0.0\n parse('2016-01-01')\n\n // v2.0.0 onward\n toDate('2016-01-01')\n parse('2016-01-01', 'YYYY-MM-DD', new Date())\n ```\n\n- **BREAKING**: the first two arguments in all `differenceIn...` functions are swapped\n to make them consistent with `distanceInWords` and `distanceInWordsStrict` functions.\n Now, the first date argument must be earlier then the second for function to return the positive number.\n\n ```javascript\n // Before v2.0.0\n differenceInYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n )\n //=> -1\n\n // v2.0.0 onward\n differenceInYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n )\n //=> 1\n ```\n\n- **BREAKING**: now `format` throws an exception if the passed date is `Invalid Date`.\n\n ```javascript\n // Before v2.0.0\n var result = format(date, 'YYYY-MM-DD')\n if (result === 'Invalid Date') {\n // ...\n }\n\n // v2.0.0 onward\n try {\n var result = format(date, 'YYYY-MM-DD')\n // ...\n } catch (e) {\n // ...\n }\n ```\n\n- **BREAKING**: `format` now assumes that the provided locale uses UTC-versions of `Date` methods,\n e.g. `getUTCMonth` instead of `getMonth`. All included locales are converted.\n This change affects only those who uses custom locales.\n Except handling of locales, behavior of `format` hasn't changed,\n i.e. it still formats dates in the user timezone.\n\n ```javascript\n var weekdays = ['sundio', 'lundio', 'mardio', 'merkurdio', 'jovdio', 'venerdio', 'saturdio']\n\n var customLocale = {\n format: {\n formatters: {\n 'dddd': function (date) {\n // Before v2.0.0\n return weekdays[date.getDay()]\n\n // v2.0.0 onward\n return weekdays[date.getUTCDay()]\n }\n },\n formattingTokensRegExp: /(\\[[^[]*])|(\\\\)?(dddd|.)/g\n }\n }\n\n format('2017-01-01', 'dddd', {locale: customLocale}) //=> 'sundio'\n ```\n\n- **BREAKING**: now `closestTo` and `closestIndexTo` don't throw an exception\n when the second argument is not an instance of array.\n\n- Every function now has `options` as the last argument which is passed to all its dependencies\n for consistency and future features.\n See [docs/Options.js](https://github.com/date-fns/date-fns/blob/master/docs/Options.js)\n\n## [1.28.0] - 2017-02-27\n\n### Added\n\n- [Romanian locale (ro)](https://github.com/date-fns/date-fns/pull/446)\n (thanks to Sergiu Munteanu [@jsergiu](https://github.com/jsergiu))\n\n### Fixed\n\n- All functions now convert all their arguments to the respective types.\n See PR: [#443](https://github.com/date-fns/date-fns/pull/443)\n\n- Fixes for ordinals (1er, 2, 3, …) in French locale.\n Thanks to [@fbonzon](https://github.com/fbonzon).\n See PR: [#449](https://github.com/date-fns/date-fns/pull/449)\n\n## [1.27.2] - 2017-02-01\n\n### Fixed\n\n- Various fixes for Dutch locale. See PR: [#416](https://github.com/date-fns/date-fns/pull/416).\n Thanks to Ruben Stolk [@rubenstolk](https://github.com/rubenstolk)\n\n## [1.27.1] - 2017-01-20\n\n### Fixed\n\n- Added generation of TypeScript locale sub-modules, allowing import of locales in TypeScript.\n\n## [1.27.0] - 2017-01-19\n\n### Added\n\n- [Macedonian locale (mk)](https://github.com/date-fns/date-fns/pull/398)\n (thanks to Petar Vlahu [@vlahupetar](https://github.com/vlahupetar))\n\n## [1.26.0] - 2017-01-15\n\n### Added\n\n- `getTime`\n\n### Fixed\n\n- Various fixes for Japanese locale. See PR: [395](https://github.com/date-fns/date-fns/pull/395).\n Thanks to Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts)\n\n## [1.25.0] - 2017-01-11\n\n### Added\n\n- [Bulgarian locale (bg)](https://github.com/date-fns/date-fns/pull/357)\n (thanks to Nikolay Stoynov [@arvigeus](https://github.com/arvigeus))\n\n- [Czech locale (cs)](https://github.com/date-fns/date-fns/pull/386)\n (thanks to David Rus [@davidrus](https://github.com/davidrus))\n\n## [1.24.0] - 2017-01-06\n\n### Added\n\n- [Modern Standard Arabic locale (ar)](https://github.com/date-fns/date-fns/pull/367)\n (thanks to Abdallah Hassan [@AbdallahAHO](https://github.com/AbdallahAHO))\n\n## [1.23.0] - 2017-01-05\n\n### Added\n\n- Auto generate TypeScript and flow typings from documentation on release.\n Thanks to [@mattlewis92](https://github.com/mattlewis92).\n See related PRs: [#355](https://github.com/date-fns/date-fns/pull/355),\n [#370](https://github.com/date-fns/date-fns/pull/370)\n\n- [Croatian locale (hr)](https://github.com/date-fns/date-fns/pull/365)\n (thanks to Matija Marohnić [@silvenon](https://github.com/silvenon))\n\n- [Thai locale (th)](https://github.com/date-fns/date-fns/pull/362)\n (thanks to Athiwat Hirunworawongkun [@athivvat](https://github.com/athivvat))\n\n- [Finnish locale (fi)](https://github.com/date-fns/date-fns/pull/361)\n (thanks to Pyry-Samuli Lahti [@Pyppe](https://github.com/Pyppe))\n\n## [1.22.0] - 2016-12-28\n\n### Added\n\n- [Icelandic locale (is)](https://github.com/date-fns/date-fns/pull/356)\n (thanks to Derek Blank [@derekblank](https://github.com/derekblank))\n\n## [1.21.1] - 2016-12-18\n\n### Fixed\n\n- Fix `isBefore` and `isAfter` documentation mistakes.\n\n## [1.21.0] - 2016-12-16\n\n### Added\n\n- [Filipino locale (fil)](https://github.com/date-fns/date-fns/pull/339)\n (thanks to Ian De La Cruz [@RIanDeLaCruz](https://github.com/RIanDeLaCruz))\n\n- [Danish locale (da)](https://github.com/date-fns/date-fns/pull/343)\n (kudos to Anders B. Hansen [@Andersbiha](https://github.com/Andersbiha))\n\n## [1.20.1] - 2016-12-14\n\n### Fixed\n\n- Fix documentation for `getOverlappingDaysInRanges`.\n\n## [1.20.0] - 2016-12-13\n\n### Added\n\n- `areRangesOverlapping` and `getOverlappingDaysInRanges`\n Thanks to Joanna T [@asia-t](https://github.com/asia-t).\n See PR: [#331](https://github.com/date-fns/date-fns/pull/331)\n\n## [1.19.0] - 2016-12-13\n\n### Added\n\n- [Greek locale (el)](https://github.com/date-fns/date-fns/pull/334)\n (kudos to Theodoros Orfanidis [@teoulas](https://github.com/teoulas))\n\n- [Slovak locale (sk)](https://github.com/date-fns/date-fns/pull/336)\n (kudos to Marek Suscak [@mareksuscak](https://github.com/mareksuscak))\n\n- Add yarn support.\n Thanks to Uladzimir Havenchyk [@havenchyk](https://github.com/havenchyk).\n See PR: [#288](https://github.com/date-fns/date-fns/pull/288)\n\n## [1.18.0] - 2016-12-12\n\n### Added\n\n- [Turkish locale (tr)](https://github.com/date-fns/date-fns/pull/329)\n (kudos to Alpcan Aydın [@alpcanaydin](https://github.com/alpcanaydin))\n\n- [Korean locale (ko)](https://github.com/date-fns/date-fns/pull/327)\n (thanks to Hong Chulju [@angdev](https://github.com/angdev))\n\n### Fixed\n\n- `SS` and `SSS` formats in `format` are now correctly displayed with leading zeros.\n Thanks to Paul Dijou [@pauldijou](https://github.com/pauldijou).\n See PR: [#330](https://github.com/date-fns/date-fns/pull/330)\n\n## [1.17.0] - 2016-12-10\n\n### Added\n\n- [Polish locale (pl)](https://github.com/date-fns/date-fns/pull/294)\n (thanks to Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks))\n\n- [Portuguese locale (pt)](https://github.com/date-fns/date-fns/pull/316)\n (thanks to Dário Freire [@dfreire](https://github.com/dfreire))\n\n- [Swedish locale (sv)](https://github.com/date-fns/date-fns/pull/311)\n (thanks to Johannes Ulén [@ejulen](https://github.com/ejulen))\n\n- [French locale (fr)](https://github.com/date-fns/date-fns/pull/281)\n (thanks to Jean Dupouy [@izeau](https://github.com/izeau))\n\n- Performance tests. See PR: [#289](https://github.com/date-fns/date-fns/pull/289)\n\n### Fixed\n\n- Fix TypeScript and flow typings for `isValid`.\n See PR: [#310](https://github.com/date-fns/date-fns/pull/310)\n\n- Fix incorrect locale tests that could potentially lead to `format` bugs.\n Kudos to Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks).\n See related PRs: [#312](https://github.com/date-fns/date-fns/pull/312),\n [#320](https://github.com/date-fns/date-fns/pull/320)\n\n- Minor language fixes in the documentation.\n Thanks to Vedad Šoše [@vedadsose](https://github.com/vedadsose) ([#314](https://github.com/date-fns/date-fns/pull/314))\n and Asia [@asia-t](https://github.com/asia-t) ([#318](https://github.com/date-fns/date-fns/pull/318))\n\n### Changed\n\n- `format` now returns `String('Invalid Date')` if the passed date is invalid.\n See PR: [#323](https://github.com/date-fns/date-fns/pull/323)\n\n- `distanceInWords`, `distanceInWordsToNow`, `distanceInWordsStrict` and `format` functions now\n check if the passed locale is valid, and fallback to English locale otherwise.\n See PR: [#321](https://github.com/date-fns/date-fns/pull/321)\n\n- *Internal*: use a loop instead of `Object.keys` in `buildFormattingTokensRegExp`\n to improve compatibility with older browsers.\n See PR: [#322](https://github.com/date-fns/date-fns/pull/322)\n\n## [1.16.0] - 2016-12-08\n\n### Added\n\n- [Italian locale (it)](https://github.com/date-fns/date-fns/pull/298)\n (thanks to Alberto Restifo [@albertorestifo](https://github.com/albertorestifo))\n\n- For German `buildDistanceInWordsLocale`, add nominative case translations (for distances without a suffix).\n Kudos to Asia [@asia-t](https://github.com/asia-t).\n See related PR: [#295](https://github.com/date-fns/date-fns/pull/295)\n\n## [1.15.1] - 2016-12-07\n\n### Fixed\n\n- Fixed TypeScript imports from individual modules.\n Thanks to [@mattlewis92](https://github.com/mattlewis92).\n See related PR: [#287](https://github.com/date-fns/date-fns/pull/287)\n\n## [1.15.0] - 2016-12-07\n\n### Added\n\n- [Indonesian locale (id)](https://github.com/date-fns/date-fns/pull/299)\n (thanks to Rahmat Budiharso [@rbudiharso](https://github.com/rbudiharso))\n\n- [Catalan locale (ca)](https://github.com/date-fns/date-fns/pull/300)\n (thanks to Guillermo Grau [@guigrpa](https://github.com/guigrpa))\n\n### Fixed\n\n- Fix some inaccuracies in Spanish locale.\n Kudos to [@guigrpa](https://github.com/guigrpa).\n See related PR: [#302](https://github.com/date-fns/date-fns/pull/302)\n\n## [1.14.1] - 2016-12-06\n\n### Fixed\n\n- Fixed broken test for Norwegian Bokmål locale.\n\n## [1.14.0] - 2016-12-06\n\n### Added\n\n- [Norwegian Bokmål locale (nb)](https://github.com/date-fns/date-fns/pull/291)\n (thanks to Hans-Kristian Koren [@Hanse](https://github.com/Hanse))\n\n## [1.13.0] - 2016-12-06\n\n### Added\n\n- [Chinese Traditional locale (zh_tw)](https://github.com/date-fns/date-fns/pull/283)\n (thanks to tonypai [@tpai](https://github.com/tpai)).\n\n- [Dutch language locale (nl)](https://github.com/date-fns/date-fns/pull/278)\n (kudos to Jorik Tangelder [@jtangelder](https://github.com/jtangelder))\n\n## [1.12.1] - 2016-12-05\n\n### Fixed\n\n- Added `distanceInWordsStrict` to the list of supported functions in I18n doc.\n\n## [1.12.0] - 2016-12-05\n\n### Added\n\n- [Spanish language locale (es)](https://github.com/date-fns/date-fns/pull/269)\n (thanks to Juan Angosto [@juanangosto](https://github.com/juanangosto)).\n\n### Fixed\n\n- Fix flow typings for some of the functions.\n See PR: [#273](https://github.com/date-fns/date-fns/pull/273)\n\n## [1.11.2] - 2016-11-28\n\n### Fixed\n\n- Bug in `parse` when it sometimes parses ISO week-numbering dates incorrectly.\n See PR: [#262](https://github.com/date-fns/date-fns/pull/262)\n\n- Bug in some functions which caused them to handle dates earlier than 100 AD incorrectly.\n See PR: [#263](https://github.com/date-fns/date-fns/pull/263)\n\n## [1.11.1] - 2016-11-24\n\n### Fixed\n\n- Include TypeScript typings with npm package.\n\n## [1.11.0] - 2016-11-23\n\n### Added\n\n- `distanceInWordsStrict`.\n Kudos to [@STRML](https://github.com/STRML).\n See related PR: [#254](https://github.com/date-fns/date-fns/pull/254)\n\n- [TypeScript](https://www.typescriptlang.org/) typings for all functions.\n Kudos to [@mattlewis92](https://github.com/mattlewis92).\n See related PR: [#255](https://github.com/date-fns/date-fns/pull/255)\n\n## [1.10.0] - 2016-11-01\n\n### Added\n\n- `parse` now can parse dates that are ISO 8601 centuries (e.g., `19` and `+0019`).\n\n ```javascript\n var result = parse('19')\n //=> Mon Jan 01 1900 00:00:00\n ```\n\n- In `parse`, added ability to specify the number of additional digits\n for extended year or century format (possible values are 0, 1 or 2; default is 2).\n\n ```javascript\n parse('+002016-11-01')\n parse('+02016-11-01', {additionalDigits: 1})\n parse('+2016-11-01', {additionalDigits: 0})\n ```\n\n## [1.9.0] - 2016-10-25\n\n### Added\n\n- Got index.js imports to work with SystemJS.\n\n## [1.8.1] - 2016-10-24\n\n### Fixed\n\n- Added Japanese and German language locales to the list in I18n doc.\n\n## [1.8.0] - 2016-10-23\n\n### Added\n\n- [Japanese language locale (ja)](https://github.com/date-fns/date-fns/pull/241)\n (thanks to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu) again!)\n\n- `getISODay`\n\n- `setISODay`\n\n## [1.7.0] - 2016-10-20\n\n### Added\n\n- [German language locale (de)](https://github.com/date-fns/date-fns/pull/237)\n (thanks to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)).\n\n## [1.6.0] - 2016-10-16\n\n### Added\n\n- [Chinese Simplified locale (zh_cn)](https://github.com/date-fns/date-fns/pull/235)\n (kudos to Changyu [@KingMario](https://github.com/KingMario) Geng).\n\n## [1.5.2] - 2016-10-13\n\n### Fixed\n\n- Incorrectly generated docs for `format`.\n\n- Fixed typo in I18n doc.\n\n## [1.5.1] - 2016-10-12\n\n### Fixed\n\n- A change log entry for [1.5.0] is added.\n\n## [1.5.0] - 2016-10-12\n\n### Added\n\n- [The initial I18n support](https://date-fns.org/docs/I18n)\n\n## [1.4.0] - 2016-10-09\n\n### Added\n\n- Basic [SystemJS](https://github.com/systemjs/systemjs) support.\n\n### Fixed\n\n- Fix incorrect behaviour of `YYYY` and `YY` for years prior to 1000:\n now `format(new Date('0001-01-01'), 'YYYY-MM-DD')` returns `0001-01-01`\n instead of `1-01-01`.\n\n## [1.3.0] - 2016-05-26\n\n### Added\n\n- `closestIndexTo`\n\n## [1.2.0] - 2016-05-23\n\n### Added\n\n- Add an ability to pass negative numbers to `setDay`.\n\n## [1.1.1] - 2016-05-19\n\n### Fixed\n\n- Fix [Flow](http://flowtype.org/) declarations for some of the functions.\n\n## [1.1.0] - 2016-05-19\n\n### Added\n\n- [Flow](http://flowtype.org/) declarations for each function\n in [the \".js.flow\" style](http://flowtype.org/docs/declarations.html#declaration-files).\n Kudos to [@JohnyDays](https://github.com/JohnyDays). See related PRs:\n\n - [#205](https://github.com/date-fns/date-fns/pull/205)\n\n - [#207](https://github.com/date-fns/date-fns/pull/207)\n\n## [1.0.0] - 2016-05-18\n\n### Fixed\n\n- `format` now returns the correct result for key `E`.\n\n- Prevent `startOf...`, `endOf...` and `lastDayOf...` functions\n to return dates with an incorrect time when the date is modifying\n into another time zone.\n\n- `parse` now parses years from 1 AD to 99 AD correctly.\n\n- Fix a bug in `getISOWeek` appearing because of a changing time zone\n (e.g., when the given date is in DST and the start of the ISO year is not).\n\n### Changed\n\n- **BREAKING**: all functions are moved to the root of the library, so they\n are now accessible with `require('date-fns/name_of_function')` or\n `import nameOfFunction from 'date-fns/name_of_function'`.\n\n ```javascript\n // Before v1.0.0\n var addMonths = require('date-fns/src/add_months')\n\n // v1.0.0 onward\n var addMonths = require('date-fns/add_months')\n ```\n\n- **BREAKING**: functions that had the last optional argument `weekStartsAt`\n (i.e. `endOfWeek`, `isSameWeek`, `lastDayOfWeek`, `setDay`, `startOfWeek`)\n now instead receive the object `options` with the property `options.weekStartsOn`\n as the last argument.\n\n ```javascript\n // Before v1.0.0\n var result = endOfWeek(new Date(2014, 8, 2), 1)\n\n // v1.0.0 onward\n var result = endOfWeek(new Date(2014, 8, 2), {weekStartsOn: 1})\n ```\n\n- **BREAKING**: remove the function `getTimeSinceMidnight` that was used inside\n the other functions.\n\n- **BREAKING**: `differenceInDays` now returns the number of full days instead\n of calendar days.\n\n- **BREAKING**: `eachDay` and `isWithinRange` now throw an exception\n when the given range boundaries are invalid.\n\n- Faster `isLeapYear`.\n\n- *Internal*: make the documentation more verbose.\n\n- *Internal*: convert the tests from Chai to power-assert allowing them\n to run against IE8.\n\n### Added\n\n- `addISOYears`\n\n- `closestTo`\n\n- `differenceInCalendarDays`\n\n- `differenceInCalendarISOWeeks`\n\n- `differenceInCalendarISOYears`\n\n- `differenceInCalendarMonths`\n\n- `differenceInCalendarQuarters`\n\n- `differenceInCalendarWeeks`\n\n- `differenceInCalendarYears`\n\n- `differenceInHours`\n\n- `differenceInISOYears`\n\n- `differenceInMilliseconds`\n\n- `differenceInMinutes`\n\n- `differenceInMonths`\n\n- `differenceInQuarters`\n\n- `differenceInSeconds`\n\n- `differenceInWeeks`\n\n- `differenceInYears`\n\n- `distanceInWords`\n\n- `distanceInWordsToNow`\n\n- `endOfISOWeek`\n\n- `endOfISOYear`\n\n- `endOfToday`\n\n- `endOfTomorrow`\n\n- `endOfYesterday`\n\n- `getDaysInYear`\n\n- `isDate`\n\n- `isFriday`\n\n- `isMonday`\n\n- `isSameISOWeek`\n\n- `isSameISOYear`\n\n- `isSaturday`\n\n- `isSunday`\n\n- `isThisHour`\n\n- `isThisISOWeek`\n\n- `isThisISOYear`\n\n- `isThisMinute`\n\n- `isThisMonth`\n\n- `isThisQuarter`\n\n- `isThisSecond`\n\n- `isThisWeek`\n\n- `isThisYear`\n\n- `isThursday`\n\n- `isTomorrow`\n\n- `isTuesday`\n\n- `isValid`\n\n- `isWednesday`\n\n- `isYesterday`\n\n- `lastDayOfISOWeek`\n\n- `lastDayOfISOYear`\n\n- `startOfISOWeek`\n\n- `startOfToday`\n\n- `startOfTomorrow`\n\n- `startOfYesterday`\n\n- `subISOYears`\n\n- Add `Qo`, `W`, `Wo`, `WW`, `GG`, `GGGG`, `Z`, `ZZ`, `X`, `x` keys to `format`.\n\n## [0.17.0] - 2015-09-29\n\n### Fixed\n\n- Fix a lot of bugs appearing when date is modifying into other time zone\n (e.g., when adding months and original date is in DST but new date is not).\n\n- Prevent instances of Date to lose milliseconds value when passed to.\n `parse` in IE10.\n\n### Changed\n\n- `setISOWeek` now keeps time from original date.\n\n- *Internal*: reuse `getDaysInMonth` inside of `addMonths`.\n\n### Added\n\n- `differenceInDays`\n\n- `getTimeSinceMidnight`\n\n- `format` now has new format key `aa`, which returns `a.m.`/`p.m.`\n as opposed to `a` that returns `am`/`pm`.\n\n- Complete UMD package (for Bower and CDN).\n\n## [0.16.0] - 2015-09-01\n\n### Changed\n\n- Use `parse` to clean date arguments in all functions.\n\n- `parse` now fallbacks to `new Date` when the argument\n is not an ISO formatted date.\n\n- *Internal*: reuse `getDaysInMonth` inside of `setMonth`.\n\n### Added\n\n- `addQuarters`\n\n- `addWeeks`\n\n- `endOfQuarter`\n\n- `getDate`\n\n- `getDay`\n\n- `getDaysInMonth`\n\n- `getHours`\n\n- `getISOWeeksInYear`\n\n- `getMilliseconds`\n\n- `getMinutes`\n\n- `getMonth`\n\n- `getSeconds`\n\n- `getYear`\n\n- `isLeapYear`\n\n- `isSameHour`\n\n- `isSameMinute`\n\n- `isSameQuarter`\n\n- `isSameSecond`\n\n- `lastDayOfQuarter`\n\n- `lastDayOfWeek`\n\n- `max`\n\n- `min`\n\n- `setDate`\n\n- `setDay`\n\n- `setHours`\n\n- `setMilliseconds`\n\n- `setMinutes`\n\n- `setSeconds`\n\n- `startOfQuarter`\n\n- `subQuarters`\n\n- `subWeeks`\n\n## [0.15.0] - 2015-08-26\n\n### Changed\n\n- `format` now returns `a.m.`/`p.m.` instead of `am`/`pm`.\n\n- `setMonth` now sets last day of month if original date was last day\n of longer month.\n\n- *Internal*: Fix code style according to ESLint.\n\n- *Internal*: Make tests run through all time zones.\n\n### Added\n\n- `getQuarter`\n\n- `setQuarter`\n\n- `getDayOfYear`\n\n- `setDayOfYear`\n\n- `isPast`\n\n- `addSeconds`\n\n- `subSeconds`\n\n- `startOfSecond`\n\n- `endOfSecond`\n\n- `startOfMinute`\n\n- `endOfMinute`\n\n- `addMilliseconds`\n\n- `subMilliseconds`\n\n- `endOfYear`\n\n- `addYears`\n\n- `subYears`\n\n- `lastDayOfYear`\n\n- `lastDayOfMonth`\n\n## [0.14.11] - 2015-08-21\n\n### Fixed\n\n- `format` now uses `parse` to avoid time zone bugs.\n\n### Changed\n\n- `setIsoWeek` now sets time to the start of the day.\n\n## [0.14.10] - 2015-07-29\n\n### Fixed\n\n- `format` now behaves correctly with 12:00 am.\n\n- `format` now behaves correctly with ordinal numbers.\n\n### Added\n\n- `compareAsc`\n\n- `compareDesc`\n\n- `addHours`\n\n- `subHours`\n\n- `isSameDay`\n\n- `parse`\n\n- `getISOYear`\n\n- `setISOYear`\n\n- `startOfISOYear`\n\n- `getISOWeek`\n\n- `setISOWeek`\n\n## [0.14.9] - 2015-01-14\n\n### Fixed\n\n- `addMonths` now correctly behaves with February\n (see [#18](https://github.com/js-fns/date-fns/pull/18)).\n\n## [0.14.8] - 2014-12-25\n\n### Fixed\n\n- `format` function now behaves correctly with `pm`/`am`.\n\n## [0.14.6] - 2014-12-04\n\n### Fixed\n\n- Fix broken Bower support.\n\n## [0.14.0] - 2014-11-05\n\n### Added\n\n- Bower package.\n\n## [0.13.0] - 2014-10-22\n\n### Added\n\n- `addMinutes`\n\n- `subMinutes`\n\n- `isEqual`\n\n- `isBefore`\n\n- `isAfter`\n\n## [0.12.1] - 2014-10-19\n\n### Fixed\n\n- Incorrect rounding in `DDD` formatter.\n\n## [0.12.0] - 2014-10-15\n\n### Added\n\n- `isSameYear`\n\n## [0.11.0] - 2014-10-15\n\n### Added\n\n- `isWithinRange`\n\n## [0.10.0] - 2014-10-13\n\n### Added\n\n- `format`\n\n- `startOfYear`\n\n## [0.9.0] - 2014-10-10\n\n### Changed\n\n- *Internal*: simplify `isWeekend`\n\n### Added\n\n- `isFuture`\n\n## [0.8.0] - 2014-10-09\n\n### Changed\n\n- *Internal*: reuse `addDays` inside of `subDays`.\n\n### Added\n\n- `addMonths`\n\n- `subMonths`\n\n- `setMonth`\n\n- `setYear`\n\n## [0.7.0] - 2014-10-08\n\n### Added\n\n- `isSameWeek`\n\n## [0.6.0] - 2014-10-07\n\n### Fixed\n\n- Inconsistent behavior of `endOfMonth`.\n\n### Added\n\n- `isFirstDayOfMonth`\n\n- `isLastDayOfMonth`\n\n- `isSameMonth`\n\n## [0.5.0] - 2014-10-07\n\n### Added\n\n- `addDays`\n\n- `subDays`\n\n## [0.4.0] - 2014-10-07\n\n### Added\n\n- `startOfWeek`\n\n- `endOfWeek`\n\n- `eachDay`\n\n## [0.3.0] - 2014-10-06\n\n### Changed\n\n- `startOfDay` now sets milliseconds as well.\n\n### Added\n\n- `endOfDay`\n\n- `startOfMonth`\n\n- `endOfMonth`\n\n## [0.2.0] - 2014-10-06\n\n### Added\n\n- `isToday`\n\n- `isWeekend`\n\n## 0.1.0 - 2014-10-06\n\n### Added\n\n- `startOfDay`\n\n[Unreleased]: https://github.com/date-fns/date-fns/compare/v1.28.0...HEAD\n[1.28.0]: https://github.com/date-fns/date-fns/compare/v1.27.2...v1.28.0\n[1.27.2]: https://github.com/date-fns/date-fns/compare/v1.27.1...v1.27.2\n[1.27.1]: https://github.com/date-fns/date-fns/compare/v1.27.0...v1.27.1\n[1.27.0]: https://github.com/date-fns/date-fns/compare/v1.26.0...v1.27.0\n[1.26.0]: https://github.com/date-fns/date-fns/compare/v1.25.0...v1.26.0\n[1.25.0]: https://github.com/date-fns/date-fns/compare/v1.24.0...v1.25.0\n[1.24.0]: https://github.com/date-fns/date-fns/compare/v1.23.0...v1.24.0\n[1.23.0]: https://github.com/date-fns/date-fns/compare/v1.22.0...v1.23.0\n[1.22.0]: https://github.com/date-fns/date-fns/compare/v1.21.1...v1.22.0\n[1.21.1]: https://github.com/date-fns/date-fns/compare/v1.21.0...v1.21.1\n[1.21.0]: https://github.com/date-fns/date-fns/compare/v1.20.1...v1.21.0\n[1.20.1]: https://github.com/date-fns/date-fns/compare/v1.20.0...v1.20.1\n[1.20.0]: https://github.com/date-fns/date-fns/compare/v1.19.0...v1.20.0\n[1.19.0]: https://github.com/date-fns/date-fns/compare/v1.18.0...v1.19.0\n[1.18.0]: https://github.com/date-fns/date-fns/compare/v1.17.0...v1.18.0\n[1.17.0]: https://github.com/date-fns/date-fns/compare/v1.16.0...v1.17.0\n[1.16.0]: https://github.com/date-fns/date-fns/compare/v1.15.1...v1.16.0\n[1.15.1]: https://github.com/date-fns/date-fns/compare/v1.15.0...v1.15.1\n[1.15.0]: https://github.com/date-fns/date-fns/compare/v1.14.1...v1.15.0\n[1.14.1]: https://github.com/date-fns/date-fns/compare/v1.14.0...v1.14.1\n[1.14.0]: https://github.com/date-fns/date-fns/compare/v1.13.0...v1.14.0\n[1.13.0]: https://github.com/date-fns/date-fns/compare/v1.12.1...v1.13.0\n[1.12.1]: https://github.com/date-fns/date-fns/compare/v1.12.0...v1.12.1\n[1.12.0]: https://github.com/date-fns/date-fns/compare/v1.11.2...v1.12.0\n[1.11.2]: https://github.com/date-fns/date-fns/compare/v1.11.1...v1.11.2\n[1.11.1]: https://github.com/date-fns/date-fns/compare/v1.11.0...v1.11.1\n[1.11.0]: https://github.com/date-fns/date-fns/compare/v1.10.0...v1.11.0\n[1.10.0]: https://github.com/date-fns/date-fns/compare/v1.9.0...v1.10.0\n[1.9.0]: https://github.com/date-fns/date-fns/compare/v1.8.1...v1.9.0\n[1.8.1]: https://github.com/date-fns/date-fns/compare/v1.8.0...v1.8.1\n[1.8.0]: https://github.com/date-fns/date-fns/compare/v1.7.0...v1.8.0\n[1.7.0]: https://github.com/date-fns/date-fns/compare/v1.6.0...v1.7.0\n[1.6.0]: https://github.com/date-fns/date-fns/compare/v1.5.2...v1.6.0\n[1.5.2]: https://github.com/date-fns/date-fns/compare/v1.5.1...v1.5.2\n[1.5.1]: https://github.com/date-fns/date-fns/compare/v1.5.0...v1.5.1\n[1.5.0]: https://github.com/date-fns/date-fns/compare/v1.4.0...v1.5.0\n[1.4.0]: https://github.com/date-fns/date-fns/compare/v1.3.0...v1.4.0\n[1.3.0]: https://github.com/date-fns/date-fns/compare/v1.2.0...v1.3.0\n[1.2.0]: https://github.com/date-fns/date-fns/compare/v1.1.1...v1.2.0\n[1.1.1]: https://github.com/date-fns/date-fns/compare/v1.1.0...v1.1.1\n[1.1.0]: https://github.com/date-fns/date-fns/compare/v1.0.0...v1.1.0\n[1.0.0]: https://github.com/date-fns/date-fns/compare/v0.17.0...v1.0.0\n[0.17.0]: https://github.com/date-fns/date-fns/compare/v0.16.0...v0.17.0\n[0.16.0]: https://github.com/date-fns/date-fns/compare/v0.15.0...v0.16.0\n[0.15.0]: https://github.com/date-fns/date-fns/compare/v0.14.11...v0.15.0\n[0.14.11]: https://github.com/date-fns/date-fns/compare/v0.14.10...v0.14.11\n[0.14.10]: https://github.com/date-fns/date-fns/compare/v0.14.9...v0.14.10\n[0.14.9]: https://github.com/date-fns/date-fns/compare/v0.14.8...v0.14.9\n[0.14.8]: https://github.com/date-fns/date-fns/compare/v0.14.6...v0.14.8\n[0.14.6]: https://github.com/date-fns/date-fns/compare/v0.14.0...v0.14.6\n[0.14.0]: https://github.com/date-fns/date-fns/compare/v0.13.0...v0.14.0\n[0.13.0]: https://github.com/date-fns/date-fns/compare/v0.12.1...v0.13.0\n[0.12.1]: https://github.com/date-fns/date-fns/compare/v0.12.0...v0.12.1\n[0.12.0]: https://github.com/date-fns/date-fns/compare/v0.11.0...v0.12.0\n[0.11.0]: https://github.com/date-fns/date-fns/compare/v0.10.0...v0.11.0\n[0.10.0]: https://github.com/date-fns/date-fns/compare/v0.9.0...v0.10.0\n[0.9.0]: https://github.com/date-fns/date-fns/compare/v0.8.0...v0.9.0\n[0.8.0]: https://github.com/date-fns/date-fns/compare/v0.7.0...v0.8.0\n[0.7.0]: https://github.com/date-fns/date-fns/compare/v0.6.0...v0.7.0\n[0.6.0]: https://github.com/date-fns/date-fns/compare/v0.5.0...v0.6.0\n[0.5.0]: https://github.com/date-fns/date-fns/compare/v0.4.0...v0.5.0\n[0.4.0]: https://github.com/date-fns/date-fns/compare/v0.3.0...v0.4.0\n[0.3.0]: https://github.com/date-fns/date-fns/compare/v0.2.0...v0.3.0\n[0.2.0]: https://github.com/date-fns/date-fns/compare/v0.1.0...v0.2.0\n","type":"markdown","urlId":"Change-Log","category":"General","title":"Change Log","description":"Changes for each version of the library","path":"/Users/lesha/Work/date-fns/CHANGELOG.md"},{"content":"# Contributing Guide\n\n## Table of Contents\n\n- [How to Help?](#how-to-help)\n\n- [Contribution Guidelines](#contribution-guidelines)\n\n- [Getting Started](#getting-started)\n\n- [Code Style Guide](#code-style-guide)\n\n - [Lint the Code](#lint-the-code)\n\n - [Use EditorConfig](#use-editorconfig)\n\n- [Documentation](#documentation)\n\n - [JSDoc](#jsdoc)\n\n## How to Help?\n\nHelp is always welcome. There are areas where you can help:\n\n- The core functionality (performance improvements, bug fixes,\n new features, etc.).\n\n- Documentation ([markdown documents](https://github.com/date-fns/date-fns/search?l=markdown),\n inline JSDoc comments).\n\n- Test suite & development environment improvements.\n\n- The [website](https://github.com/date-fns/date-fns.org).\n\nIf you see a gap, but don't have time, experience, or you just need help\nwith the library, don't hesitate to [shoot an issue](https://github.com/date-fns/date-fns/issues/new).\n\nThe date-fns functionality is comprehensive and covers most of the use cases,\nhowever it doesn't have extended time zone support. Please leave a comment\nto the [Extended time zones support issue](https://github.com/date-fns/date-fns/issues/180)\nif you are interested in the functionality or want to help with development.\n\nIf you are interested in Elm/ClojureScript/etc. wrappers,\nplease [file an issue](https://github.com/date-fns/date-fns/issues/new).\n\n## Contribution Guidelines\n\nDue to the modular nature of date-fns, it's more than open to new features.\nHowever, when a new function duplicates the existing functionality, native API\nor causes significant build size increase, a PR might be rejected or\nthe author can be asked to move the code to a new or another package.\n\nPlease follow the main contributing rules, to maintain date-fns' top quality:\n\n- Follow style guides:\n\n - [Lint the code](#lint-the-code).\n\n - [Use EditorConfig](#use-editorconfig).\n\n- Write tests.\n\n- [Write documentation](#documentation).\n\n- [Write good commit messages].\n\n- Add an entry to Unreleased section in [CHANGELOG].\n\n- Squash related commits before a PR merge.\n\n- Don't change the library version.\n\n[Write good commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html\n[CHANGELOG]: https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md\n\n## Getting Started\n\n1. [Install Node.js](https://nodejs.org/en/download).\n\n2. Fork the project and clone the fork repo.\n\n3. Run `yarn` or `npm install` to install the application dependencies.\n\n## Code Style Guide\n\n### Lint the Code\n\nThe project follows [JavaScript Standard Style]. To lint the code, run:\n\n```bash\nnpm run lint\n# or\nyarn run lint\n```\n\n[JavaScript Standard Style]: http://standardjs.com/\n\n### Use EditorConfig\n\nThe project uses [EditorConfig] to define basic coding style guides.\nPlease install a plugin for your editor of choice or manually enforce\nthe rules listed in [.editorconfig].\n\n[EditorConfig]: http://editorconfig.org\n[.editorconfig]: https://github.com/date-fns/date-fns.org/blob/master/.editorconfig\n\n## Documentation\n\n### JSDoc\n\n[JSDoc](http://usejsdoc.org) is used for the code documentation. Along with\nstandard JSDoc tags, date-fns uses `@category` tag that allows\nto group functions.\n\n[jsdoc-parse](https://github.com/jsdoc2md/jsdoc-parse) is used to generate\n[documentation JSON](https://github.com/date-fns/date-fns/blob/master/dist/date_fns_docs.json)\nconsumed by [date-fns.org](https://date-fns.org/docs).\n","type":"markdown","urlId":"Contributing","category":"General","title":"Contributing","description":"Contribution manual","path":"/Users/lesha/Work/date-fns/CONTRIBUTING.md"},{"content":"# Internationalization\n\n## Table of Contents\n\n- [Usage](#usage)\n\n- [Supported Languages](#supported-languages)\n\n- [Adding New Language](#adding-new-language)\n\n## Usage\n\n**Important! Note that non-CommonJS packages (Bower, CDN)\ndon't support I18n yet.** Please [vote for the issue](https://github.com/date-fns/date-fns/issues/232)\nif you want to make it happen.\n\nThere are just a few functions that support I18n:\n\n- [`format`](https://date-fns.org/docs/format)\n- [`distanceInWords`](https://date-fns.org/docs/distanceInWords)\n- [`distanceInWordsToNow`](https://date-fns.org/docs/distanceInWordsToNow)\n- [`distanceInWordsStrict`](https://date-fns.org/docs/distanceInWordsStrict)\n\nTo use a locale, you need to require it and then pass\nas an option to a function:\n\n```js\nvar distanceInWords = require('date-fns/distance_in_words')\n// Require Esperanto locale\nvar eoLocale = require('date-fns/locale/eo')\n\nvar result = distanceInWords(\n new Date(2016, 7, 1),\n new Date(2015, 0, 1),\n {locale: eoLocale} // Pass the locale as an option\n)\n//=> 'pli ol 1 jaro'\n```\n\nIt might seem complicated to require and pass locales as options,\nbut unlike Moment.js which bloats your build with all the locales\nby default date-fns forces developer to manually require locales when needed.\nTo make API simple, we encourage you to write tiny wrappers and use those\ninstead of original functions:\n\n```js\n// app/_lib/format.js\n\nvar format = require('date-fns/format')\n\nvar locales = {\n en: require('date-fns/locale/en'),\n eo: require('date-fns/locale/eo'),\n ru: require('date-fns/locale/ru')\n}\n\nmodule.exports = function (date, formatStr) {\n return format(date, formatStr, {\n locale: locales[window.__localeId__] // or global.__localeId__\n })\n}\n\n// Later:\n\nvar format = require('app/_lib/format')\n\nwindow.__localeId__ = 'en'\nformat(friday13, 'dddd D')\n//=> 'Friday 13'\n\nwindow.__localeId__ = 'eo'\nformat(friday13, 'dddd D')\n//=> 'vendredo 13'\n```\n\n## Supported Languages\n\ndate-fns currently supports:\n\n1. [English](https://github.com/date-fns/date-fns/tree/master/src/locale/en)\n (`en`; it's the built-in language and doesn't require any setup)\n2. [Russian](https://github.com/date-fns/date-fns/tree/master/src/locale/ru) (`ru`)\n3. [Esperanto](https://github.com/date-fns/date-fns/tree/master/src/locale/eo) (`eo`)\n4. [Chinese Simplified](https://github.com/date-fns/date-fns/tree/master/src/locale/zh_cn)\n (`zh_cn`; kudos to Changyu Geng [@KingMario](https://github.com/KingMario))\n5. [German](https://github.com/date-fns/date-fns/tree/master/src/locale/de)\n (`de`; kudos to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)\n and Asia [@asia-t](https://github.com/asia-t))\n6. [Japanese](https://github.com/date-fns/date-fns/tree/master/src/locale/ja)\n (`ja`; kudos to Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)\n and Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts))\n7. [Spanish](https://github.com/date-fns/date-fns/tree/master/src/locale/es)\n (`es`; kudos to Juan Angosto [@juanangosto](https://github.com/juanangosto)\n and Guillermo Grau [@guigrpa](https://github.com/guigrpa))\n8. [Dutch](https://github.com/date-fns/date-fns/tree/master/src/locale/nl)\n (`nl`; kudos to Jorik Tangelder [@jtangelder](https://github.com/jtangelder)\n and Ruben Stolk [@rubenstolk](https://github.com/rubenstolk))\n9. [Chinese Traditional](https://github.com/date-fns/date-fns/tree/master/src/locale/zh_tw)\n (`zh_tw`; kudos to tonypai [@tpai](https://github.com/tpai))\n10. [Norwegian Bokmål](https://github.com/date-fns/date-fns/tree/master/src/locale/nb)\n (`nb`; kudos to Hans-Kristian Koren [@Hanse](https://github.com/Hanse))\n11. [Catalan](https://github.com/date-fns/date-fns/tree/master/src/locale/ca)\n (`ca`; kudos to Guillermo Grau [@guigrpa](https://github.com/guigrpa))\n12. [Indonesian](https://github.com/date-fns/date-fns/tree/master/src/locale/id)\n (`id`; kudos to Rahmat Budiharso [@rbudiharso](https://github.com/rbudiharso))\n13. [Italian](https://github.com/date-fns/date-fns/tree/master/src/locale/it)\n (`it`; kudos to Alberto Restifo [@albertorestifo](https://github.com/albertorestifo))\n14. [Polish](https://github.com/date-fns/date-fns/tree/master/src/locale/pl)\n (`pl`; kudos to Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks))\n15. [Portuguese](https://github.com/date-fns/date-fns/tree/master/src/locale/pt)\n (`pt`; kudos to Dário Freire [@dfreire](https://github.com/dfreire))\n16. [Swedish](https://github.com/date-fns/date-fns/tree/master/src/locale/sv)\n (`sv`; kudos to Johannes Ulén [@ejulen](https://github.com/ejulen))\n17. [French](https://github.com/date-fns/date-fns/tree/master/src/locale/fr)\n (`fr`; kudos to Jean Dupouy [@izeau](https://github.com/izeau)\n and François B [@fbonzon](https://github.com/fbonzon))\n18. [Turkish](https://github.com/date-fns/date-fns/tree/master/src/locale/tr)\n (`tr`; kudos to Alpcan Aydın [@alpcanaydin](https://github.com/alpcanaydin))\n19. [Korean](https://github.com/date-fns/date-fns/tree/master/src/locale/ko)\n (`ko`; kudos to Hong Chulju [@angdev](https://github.com/angdev))\n20. [Greek](https://github.com/date-fns/date-fns/tree/master/src/locale/el)\n (`el`; kudos to Theodoros Orfanidis [@teoulas](https://github.com/teoulas))\n21. [Slovak](https://github.com/date-fns/date-fns/tree/master/src/locale/sk)\n (`sk`; kudos to Marek Suscak [@mareksuscak](https://github.com/mareksuscak))\n22. [Filipino](https://github.com/date-fns/date-fns/tree/master/src/locale/fil)\n (`fil`; kudos to Ian De La Cruz [@RIanDeLaCruz](https://github.com/RIanDeLaCruz))\n23. [Danish](https://github.com/date-fns/date-fns/tree/master/src/locale/da)\n (`da`; kudos to Anders B. Hansen [@Andersbiha](https://github.com/Andersbiha))\n24. [Icelandic](https://github.com/date-fns/date-fns/tree/master/src/locale/is)\n (`is`; kudos to Derek Blank [@derekblank](https://github.com/derekblank))\n25. [Finnish](https://github.com/date-fns/date-fns/tree/master/src/locale/fi)\n (`fi`; kudos to Pyry-Samuli Lahti [@Pyppe](https://github.com/Pyppe))\n26. [Thai](https://github.com/date-fns/date-fns/tree/master/src/locale/th)\n (`th`; kudos to Athiwat Hirunworawongkun [@athivvat](https://github.com/athivvat))\n27. [Croatian](https://github.com/date-fns/date-fns/tree/master/src/locale/hr)\n (`hr`; kudos to Matija Marohnić [@silvenon](https://github.com/silvenon))\n28. [Arabic](https://github.com/date-fns/date-fns/tree/master/src/locale/ar)\n (`ar`; kudos to Abdallah Hassan [@AbdallahAHO](https://github.com/AbdallahAHO))\n29. [Bulgarian](https://github.com/date-fns/date-fns/tree/master/src/locale/bg)\n (`bg`; kudos to Nikolay Stoynov [@arvigeus](https://github.com/arvigeus))\n30. [Czech](https://github.com/date-fns/date-fns/tree/master/src/locale/cs)\n (`cs`; kudos to David Rus [@davidrus](https://github.com/davidrus))\n31. [Macedonian](https://github.com/date-fns/date-fns/tree/master/src/locale/mk)\n (`mk`; kudos to Petar Vlahu [@vlahupetar](https://github.com/vlahupetar))\n32. [Romanian](https://github.com/date-fns/date-fns/tree/master/src/locale/ro)\n (`ro`; kudos to Sergiu Munteanu [@jsergiu](https://github.com/jsergiu))\n\nMore is coming, help is welcome!\n\n## Adding New Language\n\nAt the moment there is no definitive guide, so if you feel brave enough,\nuse this quick guide:\n\n- First of all, [create an issue](https://github.com/date-fns/date-fns/issues/new?title=XXX%20language%20support&labels[]=I18n)\n so you won't overlap with others.\n- Use [English locale](https://github.com/date-fns/date-fns/tree/master/src/locale/en)\n as the basis and then incrementally adjust the tests and the code.\n- If you have questions or need guidance, leave a comment in the issue.\n\nThank you for your support!\n","type":"markdown","urlId":"I18n","category":"General","title":"I18n","description":"Internationalization","path":"/Users/lesha/Work/date-fns/docs/i18n.md"},{"content":"# ECMAScript Modules\n\n\n**date-fns** v2.x provides support for\n[ECMAScript Modules](http://www.ecma-international.org/ecma-262/6.0/#sec-modules)\nvia `'date-fns/esm'` subpackage.\n\n## Table of Contents\n\n- [Tree-shaking](#tree-shaking)\n\n- [Usage With TypeScript](#usage-with-typescript)\n\n## Tree-shaking\n\nECMAScript Modules allow usage with bundlers that support tree-shaking,\nlike [rollup.js](http://rollupjs.org) and [webpack](https://webpack.js.org):\n\n```javascript\n// Without tree-shaking:\nimport format from 'date-fns/format'\nimport parse from 'date-fns/parse'\n\n// With tree-shaking:\nimport {format, parse} from 'date-fns/esm'\n```\n\n**Important**: as at webpack 2.2.0, tree-shaking is not removing all unused imports.\nSee [webpack issue #2867](https://github.com/webpack/webpack/issues/2867)\n\n## Usage With TypeScript\n\nAlso, as `'date-fns/esm'` function submodules provide default export,\nthey can be used with TypeScript to import functions in more idiomatic way:\n\n```typescript\n// In TypeScript, instead of importing regular function submodules:\nimport * as format from 'date-fns/format'\n\n// you can use 'date-fns/esm' function submodules as a shortcut:\nimport format from 'date-fns/esm/format'\n```\n","type":"markdown","urlId":"ECMAScript-Modules","category":"General","title":"ECMAScript Modules","description":"Tree-shaking guide","path":"/Users/lesha/Work/date-fns/docs/esm.md"},{"content":"# FP Guide\n\n**date-fns** v2.x provides [functional programming](https://en.wikipedia.org/wiki/Functional_programming) (FP)\nfriendly functions, like those in [lodash](https://github.com/lodash/lodash/wiki/FP-Guide),\nthat support [currying](https://en.wikipedia.org/wiki/Currying).\n\n## Table of Contents\n\n- [Usage](#usage)\n\n- [Using Function Composition](#using-function-composition)\n\n- [ECMAScript Modules](#ecmascript-modules)\n\n## Usage\n\nFP functions are provided via `'date-fns/fp'` submodule.\n\nEach non-FP function has two FP counterparts: one that has [Options](docs/Options) object as its first argument\nand one that hasn't. The name of the former has `WithOptions` added to the end of its name.\n\nIn **date-fns'** FP functions, the order of arguments is reversed.\n\n```javascript\nimport addYears from 'date-fns/fp/addYears'\nimport formatWithOptions from 'date-fns/fp/formatWithOptions'\nimport eoLocale from 'date-fns/locale/eo'\nimport toUpper from 'lodash/fp/toUpper' // 'date-fns/fp' is compatible with 'lodash/fp'!\n\n// If FP function has not recieved enough arguments, it returns another function\nconst addFiveYears = addYears(5)\n\n// Several arguments can be curried at once\nconst dateToString = formatWithOptions({locale: eoLocale}, 'D MMMM YYYY')\n\nconst dates = [\n new Date(2017, 0 /* Jan */, 1),\n new Date(2017, 1 /* Feb */, 11),\n new Date(2017, 6 /* Jul */, 2)\n]\n\nconst formattedDates = dates.map(addFiveYears).map(dateToString).map(toUpper)\n//=> ['1 JANUARO 2022', '11 FEBRUARO 2022', '2 JULIO 2022']\n```\n\n## Using Function Composition\n\nThe main advantage of FP functions is support of functional-style\n[function composing](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba).\n\nIn the example above, you can compose `addFiveYears`, `dateToString` and `toUpper` into a single function:\n\n```javascript\nconst formattedDates = dates.map((date) => toUpper(dateToString(addFiveYears(date))))\n```\n\nOr you can use `compose` function provided by [lodash](https://lodash.com) to do the same in more idiomatic way:\n\n```javascript\nimport compose from 'lodash/fp/compose'\n\nconst formattedDates = dates.map(compose(toUpper, dateToString, addFiveYears))\n```\n\nOr if you prefer natural direction of composing (as opposed to the computationally correct order),\nyou can use lodash' `flow` instead:\n\n```javascript\nimport flow from 'lodash/fp/flow'\n\nconst formattedDates = dates.map(flow(addFiveYears, dateToString, toUpper))\n```\n\n## ECMAScript Modules\n\nFP functions are also can be used with bundlers that support tree-shaking,\nlike [rollup.js](http://rollupjs.org) and [webpack](https://webpack.js.org)\nvia `'date-fns/esm/fp'` submodule:\n\n```javascript\nimport {addYears, formatWithOptions} from 'date-fns/esm/fp'\n```\n\nRead more in [ECMAScript Modules](docs/esm) article in the documentation.\n","type":"markdown","urlId":"FP-Guide","category":"General","title":"FP Guide","description":"Curried functions","path":"/Users/lesha/Work/date-fns/docs/fp.md"},{"content":"# License\n\ndate-fns is licensed under the [MIT license](http://kossnocorp.mit-license.org).\nRead more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).\n","type":"markdown","urlId":"License","category":"General","title":"License","description":"MIT © Sasha Koss","path":"/Users/lesha/Work/date-fns/LICENSE.md"}],"Types":[{"type":"jsdoc","urlId":"Interval","category":"Types","title":"Interval","description":"An object that combines two dates to represent the time interval.","content":{"id":"Interval","longname":"Interval","name":"Interval","kind":"typedef","scope":"global","description":"An object that combines two dates to represent the time interval.","type":{"names":["Object"]},"properties":[{"type":{"names":["Date","String","Number"]},"description":"the start of the interval","name":"start"},{"type":{"names":["Date","String","Number"]},"description":"the end of the interval","name":"end"}],"category":"Types","meta":{"lineno":1,"filename":"Interval.js","path":"/Users/lesha/Work/date-fns/docs"},"summary":"An object that combines two dates to represent the time interval.","order":0}},{"type":"jsdoc","urlId":"Options","category":"Types","title":"Options","description":"An object passed as the last optional argument to all functions.","content":{"id":"Options","longname":"Options","name":"Options","kind":"typedef","scope":"global","description":"An object passed as the last optional argument to all functions.","examples":["// For 15 December 12345 AD, represent the start of the week in Esperanto,\n// if the first day of the week is Monday:\nvar eoLocale = require('date-fns/locale/eo')\nvar options = {\n weekStartsOn: 1,\n additionalDigits: 1,\n locale: eoLocale\n}\nvar result = format(startOfWeek('+12345-12-15', options), 'dddd, D MMMM YYYY', options)\n//=> 'lundo, 10 decembro 12345'"],"type":{"names":["Object"]},"properties":[{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday).\n Used by `differenceInCalendarWeeks`, `endOfWeek`, `isSameWeek`,\n `isThisWeek`, `lastDayOfWeek`, `setDay`, and `startOfWeek`","name":"weekStartsOn"},{"type":{"names":["0","1","2"]},"optional":true,"defaultvalue":2,"description":"the additional number of digits in the extended year format.\n Used by all functions that take String as Date-like argument.\n Internally, passed to `toDate` to specify which way to convert extended year formatted String to Date.\n See [toDate]{@link docs/toDate}","name":"additionalDigits"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object.\n Used by `distanceInWords`, `distanceInWordsStrict`, `format` and `parse`.\n See [Locale]{@link docs/Locale}","name":"locale"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"used by `distanceInWords`.\n If true, distances less than a minute are more detailed","name":"includeSeconds"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"used by `distanceInWords` and `distanceInWordsStrinct`.\n If true, the result will indicate if the second date is earlier or later than the first","name":"addSuffix"},{"type":{"names":["'s'","'m'","'h'","'d'","'M'","'Y'"]},"optional":true,"description":"used by `distanceInWordsStrict`.\n If specified, will force a unit","name":"unit"},{"type":{"names":["'floor'","'ceil'","'round'"]},"optional":true,"defaultvalue":"'floor'","description":"used by `distanceInWordsStrict`.\n Specifies, which way to round partial units","name":"partialMethod"}],"category":"Types","meta":{"lineno":1,"filename":"Options.js","path":"/Users/lesha/Work/date-fns/docs"},"summary":"An object passed as the last optional argument to all functions.","order":0}},{"type":"jsdoc","urlId":"Locale","category":"Types","title":"Locale","description":"A locale object.","content":{"id":"Locale","longname":"Locale","name":"Locale","kind":"typedef","scope":"global","description":"A locale object.","type":{"names":["Object"]},"properties":[{"type":{"names":["Object"]},"optional":true,"description":"the object used to localize\n `distanceInWords` and `distanceInWordsStrict` functions","name":"distanceInWords"},{"type":{"names":["function"]},"optional":true,"name":"distanceInWords.localize"},{"type":{"names":["Object"]},"optional":true,"description":"the object used to localize `format` function","name":"format"},{"type":{"names":["Object"]},"optional":true,"description":"the object with formatter functions","name":"format.formatters"},{"type":{"names":["RegExp"]},"optional":true,"description":"a RegExp used to split a format string into the token array","name":"format.formattingTokensRegExp"},{"type":{"names":["Object"]},"optional":true,"description":"the object used to localize `parse` function","name":"parse"},{"type":{"names":["Object"]},"optional":true,"description":"the object with units","name":"parse.units"},{"type":{"names":["Object"]},"optional":true,"description":"the object with parsers","name":"parse.parsers"},{"type":{"names":["RegExp"]},"optional":true,"description":"a RegExp used to split a format string into the token array","name":"parse.parsingTokensRegExp"}],"category":"Types","meta":{"lineno":1,"filename":"Locale.js","path":"/Users/lesha/Work/date-fns/docs"},"summary":"A locale object.","order":0}}],"Common Helpers":[{"type":"jsdoc","urlId":"closestIndexTo","category":"Common Helpers","title":"closestIndexTo","description":"Return an index of the closest date from the array comparing to the given date.","content":{"id":"closestIndexTo","longname":"closestIndexTo","name":"closestIndexTo","kind":"member","scope":"global","description":"Return an index of the closest date from the array comparing to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Array.","Array.","Array."]},"description":"the array to search","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which date is closer to 6 September 2015?\nvar dateToCompare = new Date(2015, 8, 6)\nvar datesArray = [\n new Date(2015, 0, 1),\n new Date(2016, 0, 1),\n new Date(2017, 0, 1)\n]\nvar result = closestIndexTo(dateToCompare, datesArray)\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"an index of the date closest to the given date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/closest_index_to"},"summary":"Return an index of the closest date from the array comparing to the given date.","order":0}},{"type":"jsdoc","urlId":"closestTo","category":"Common Helpers","title":"closestTo","description":"Return a date from the array closest to the given date.","content":{"id":"closestTo","longname":"closestTo","name":"closestTo","kind":"member","scope":"global","description":"Return a date from the array closest to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Array.","Array.","Array."]},"description":"the array to search","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?\nvar dateToCompare = new Date(2015, 8, 6)\nvar result = closestTo(dateToCompare, [\n new Date(2000, 0, 1),\n new Date(2030, 0, 1)\n])\n//=> Tue Jan 01 2030 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the date from the array closest to the given date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/closest_to"},"summary":"Return a date from the array closest to the given date.","order":0}},{"type":"jsdoc","urlId":"compareAsc","category":"Common Helpers","title":"compareAsc","description":"Compare the two dates and return -1, 0 or 1.","content":{"id":"compareAsc","longname":"compareAsc","name":"compareAsc","kind":"member","scope":"global","description":"Compare the two dates and return 1 if the first date is after the second,\n-1 if the first date is before the second or 0 if dates are equal.","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to compare","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to compare","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Compare 11 February 1987 and 10 July 1989:\nvar result = compareAsc(\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n)\n//=> -1","// Sort the array of dates:\nvar result = [\n new Date(1995, 6, 2),\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n].sort(compareAsc)\n//=> [\n// Wed Feb 11 1987 00:00:00,\n// Mon Jul 10 1989 00:00:00,\n// Sun Jul 02 1995 00:00:00\n// ]"],"returns":[{"type":{"names":["Number"]},"description":"the result of the comparison"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/compare_asc"},"summary":"Compare the two dates and return -1, 0 or 1.","order":0}},{"type":"jsdoc","urlId":"compareDesc","category":"Common Helpers","title":"compareDesc","description":"Compare the two dates reverse chronologically and return -1, 0 or 1.","content":{"id":"compareDesc","longname":"compareDesc","name":"compareDesc","kind":"member","scope":"global","description":"Compare the two dates and return -1 if the first date is after the second,\n1 if the first date is before the second or 0 if dates are equal.","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to compare","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to compare","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Compare 11 February 1987 and 10 July 1989 reverse chronologically:\nvar result = compareDesc(\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n)\n//=> 1","// Sort the array of dates in reverse chronological order:\nvar result = [\n new Date(1995, 6, 2),\n new Date(1987, 1, 11),\n new Date(1989, 6, 10)\n].sort(compareDesc)\n//=> [\n// Sun Jul 02 1995 00:00:00,\n// Mon Jul 10 1989 00:00:00,\n// Wed Feb 11 1987 00:00:00\n// ]"],"returns":[{"type":{"names":["Number"]},"description":"the result of the comparison"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/compare_desc"},"summary":"Compare the two dates reverse chronologically and return -1, 0 or 1.","order":0}},{"type":"jsdoc","urlId":"distanceInWords","category":"Common Helpers","title":"distanceInWords","description":"Return the distance between the given dates in words.","content":{"id":"distanceInWords","longname":"distanceInWords","name":"distanceInWords","kind":"member","scope":"global","description":"Return the distance between the given dates in words.\n\n| Distance between dates | Result |\n|-------------------------------------------------------------------|---------------------|\n| 0 ... 30 secs | less than a minute |\n| 30 secs ... 1 min 30 secs | 1 minute |\n| 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n| 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n| 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n| 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n| 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n| 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n| 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n| 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n| 1 yr ... 1 yr 3 months | about 1 year |\n| 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n| 1 yr 9 months ... 2 yrs | almost 2 years |\n| N yrs ... N yrs 3 months | about N years |\n| N yrs 3 months ... N yrs 9 months | over N years |\n| N yrs 9 months ... N+1 yrs | almost N+1 years |\n\nWith `options.includeSeconds == true`:\n| Distance between dates | Result |\n|------------------------|----------------------|\n| 0 secs ... 5 secs | less than 5 seconds |\n| 5 secs ... 10 secs | less than 10 seconds |\n| 10 secs ... 20 secs | less than 20 seconds |\n| 20 secs ... 40 secs | half a minute |\n| 40 secs ... 60 secs | less than a minute |\n| 60 secs ... 90 secs | 1 minute |","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Date","String","Number"]},"description":"the other date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"distances less than a minute are more detailed","name":"options.includeSeconds"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"result indicates if the second date is earlier or later than the first","name":"options.addSuffix"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"}],"examples":["// What is the distance between 2 July 2014 and 1 January 2015?\nvar result = distanceInWords(\n new Date(2014, 6, 2),\n new Date(2015, 0, 1)\n)\n//=> '6 months'","// What is the distance between 1 January 2015 00:00:15\n// and 1 January 2015 00:00:00, including seconds?\nvar result = distanceInWords(\n new Date(2015, 0, 1, 0, 0, 15),\n new Date(2015, 0, 1, 0, 0, 0),\n {includeSeconds: true}\n)\n//=> 'less than 20 seconds'","// What is the distance from 1 January 2016\n// to 1 January 2015, with a suffix?\nvar result = distanceInWords(\n new Date(2016, 0, 1),\n new Date(2015, 0, 1),\n {addSuffix: true}\n)\n//=> 'about 1 year ago'","// What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\nimport { eoLocale } from 'date-fns/locale/eo'\nvar result = distanceInWords(\n new Date(2016, 7, 1),\n new Date(2015, 0, 1),\n {locale: eoLocale}\n)\n//=> 'pli ol 1 jaro'"],"returns":[{"type":{"names":["String"]},"description":"the distance in words"}],"category":"Common Helpers","meta":{"lineno":12,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/distance_in_words"},"summary":"Return the distance between the given dates in words.","order":0}},{"type":"jsdoc","urlId":"distanceInWordsStrict","category":"Common Helpers","title":"distanceInWordsStrict","description":"Return the distance between the given dates in words.","content":{"id":"distanceInWordsStrict","longname":"distanceInWordsStrict","name":"distanceInWordsStrict","kind":"member","scope":"global","description":"Return the distance between the given dates in words, using strict units.\nThis is like `distanceInWords`, but does not use helpers like 'almost', 'over',\n'less than' and the like.\n\n| Distance between dates | Result |\n|------------------------|---------------------|\n| 0 ... 59 secs | [0..59] seconds |\n| 1 ... 59 mins | [1..59] minutes |\n| 1 ... 23 hrs | [1..23] hours |\n| 1 ... 29 days | [1..29] days |\n| 1 ... 11 months | [1..11] months |\n| 1 ... N years | [1..N] years |","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Date","String","Number"]},"description":"the other date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"result indicates if the second date is earlier or later than the first","name":"options.addSuffix"},{"type":{"names":["'s'","'m'","'h'","'d'","'M'","'Y'"]},"optional":true,"description":"if specified, will force a unit","name":"options.unit"},{"type":{"names":["'floor'","'ceil'","'round'"]},"optional":true,"defaultvalue":"'floor'","description":"which way to round partial units","name":"options.partialMethod"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"}],"examples":["// What is the distance between 2 July 2014 and 1 January 2015?\nvar result = distanceInWordsStrict(\n new Date(2014, 6, 2),\n new Date(2015, 0, 2)\n)\n//=> '6 months'","// What is the distance between 1 January 2015 00:00:15\n// and 1 January 2015 00:00:00?\nvar result = distanceInWordsStrict(\n new Date(2015, 0, 1, 0, 0, 15),\n new Date(2015, 0, 1, 0, 0, 0),\n)\n//=> '15 seconds'","// What is the distance from 1 January 2016\n// to 1 January 2015, with a suffix?\nvar result = distanceInWordsStrict(\n new Date(2016, 0, 1),\n new Date(2015, 0, 1),\n {addSuffix: true}\n)\n//=> '1 year ago'","// What is the distance from 1 January 2016\n// to 1 January 2015, in minutes?\nvar result = distanceInWordsStrict(\n new Date(2016, 0, 1),\n new Date(2015, 0, 1),\n {unit: 'm'}\n)\n//=> '525600 minutes'","// What is the distance from 1 January 2016\n// to 28 January 2015, in months, rounded up?\nvar result = distanceInWordsStrict(\n new Date(2015, 0, 28),\n new Date(2015, 0, 1),\n {unit: 'M', partialMethod: 'ceil'}\n)\n//=> '1 month'","// What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\nimport { eoLocale } from 'date-fns/locale/eo'\nvar result = distanceInWordsStrict(\n new Date(2016, 7, 1),\n new Date(2015, 0, 1),\n {locale: eoLocale}\n)\n//=> '1 jaro'"],"returns":[{"type":{"names":["String"]},"description":"the distance in words"}],"category":"Common Helpers","meta":{"lineno":10,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/distance_in_words_strict"},"summary":"Return the distance between the given dates in words.","order":0}},{"type":"jsdoc","urlId":"format","category":"Common Helpers","title":"format","description":"Format the date.","content":{"id":"format","longname":"format","name":"format","kind":"member","scope":"global","description":"Return the formatted date string in the given format.\n\nAccepted tokens:\n| Unit | Token | Result examples |\n|-------------------------|-------|----------------------------------|\n| Month | M | 1, 2, ..., 12 |\n| | Mo | 1st, 2nd, ..., 12th |\n| | MM | 01, 02, ..., 12 |\n| | MMM | Jan, Feb, ..., Dec |\n| | MMMM | January, February, ..., December |\n| Quarter | Q | 1, 2, 3, 4 |\n| | Qo | 1st, 2nd, 3rd, 4th |\n| Day of month | D | 1, 2, ..., 31 |\n| | Do | 1st, 2nd, ..., 31st |\n| | DD | 01, 02, ..., 31 |\n| Day of year | DDD | 1, 2, ..., 366 |\n| | DDDo | 1st, 2nd, ..., 366th |\n| | DDDD | 001, 002, ..., 366 |\n| Day of week | d | 0, 1, ..., 6 |\n| | do | 0th, 1st, ..., 6th |\n| | dd | Su, Mo, ..., Sa |\n| | ddd | Sun, Mon, ..., Sat |\n| | dddd | Sunday, Monday, ..., Saturday |\n| Day of ISO week | E | 1, 2, ..., 7 |\n| ISO week | W | 1, 2, ..., 53 |\n| | Wo | 1st, 2nd, ..., 53rd |\n| | WW | 01, 02, ..., 53 |\n| Year | YY | 00, 01, ..., 99 |\n| | YYYY | 1900, 1901, ..., 2099 |\n| ISO week-numbering year | GG | 00, 01, ..., 99 |\n| | GGGG | 1900, 1901, ..., 2099 |\n| AM/PM | A | AM, PM |\n| | a | am, pm |\n| | aa | a.m., p.m. |\n| Hour | H | 0, 1, ... 23 |\n| | HH | 00, 01, ... 23 |\n| | h | 1, 2, ..., 12 |\n| | hh | 01, 02, ..., 12 |\n| Minute | m | 0, 1, ..., 59 |\n| | mm | 00, 01, ..., 59 |\n| Second | s | 0, 1, ..., 59 |\n| | ss | 00, 01, ..., 59 |\n| 1/10 of second | S | 0, 1, ..., 9 |\n| 1/100 of second | SS | 00, 01, ..., 99 |\n| Millisecond | SSS | 000, 001, ..., 999 |\n| Timezone | Z | -01:00, +00:00, ... +12:00 |\n| | ZZ | -0100, +0000, ..., +1200 |\n| Seconds timestamp | X | 512969520 |\n| Milliseconds timestamp | x | 512969520900 |\n\nThe characters wrapped in square brackets are escaped.\n\nThe result may vary by locale.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["String"]},"description":"the string of tokens","name":"format"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"}],"examples":["// Represent 11 February 2014 in middle-endian format:\nvar result = format(\n new Date(2014, 1, 11),\n 'MM/DD/YYYY'\n)\n//=> '02/11/2014'","// Represent 2 July 2014 in Esperanto:\nimport { eoLocale } from 'date-fns/locale/eo'\nvar result = format(\n new Date(2014, 6, 2),\n 'Do [de] MMMM YYYY',\n {locale: eoLocale}\n)\n//=> '2-a de julio 2014'"],"returns":[{"type":{"names":["String"]},"description":"the formatted date string"}],"category":"Common Helpers","summary":"Format the date.","exceptions":[{"type":{"names":["Error"]},"description":"The date must be valid"}],"meta":{"lineno":10,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/format"},"order":0}},{"type":"jsdoc","urlId":"isAfter","category":"Common Helpers","title":"isAfter","description":"Is the first date after the second one?","content":{"id":"isAfter","longname":"isAfter","name":"isAfter","kind":"member","scope":"global","description":"Is the first date after the second one?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date that should be after the other one to return true","name":"date"},{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 10 July 1989 after 11 February 1987?\nvar result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the first date is after the second date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_after"},"summary":"Is the first date after the second one?","order":0}},{"type":"jsdoc","urlId":"isBefore","category":"Common Helpers","title":"isBefore","description":"Is the first date before the second one?","content":{"id":"isBefore","longname":"isBefore","name":"isBefore","kind":"member","scope":"global","description":"Is the first date before the second one?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date that should be before the other one to return true","name":"date"},{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 10 July 1989 before 11 February 1987?\nvar result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the first date is before the second date"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_before"},"summary":"Is the first date before the second one?","order":0}},{"type":"jsdoc","urlId":"isDate","category":"Common Helpers","title":"isDate","description":"Is the given argument an instance of Date?","content":{"id":"isDate","longname":"isDate","name":"isDate","kind":"member","scope":"global","description":"Is the given argument an instance of Date?","params":[{"type":{"names":["*"]},"description":"the argument to check","name":"argument"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 'mayonnaise' a Date?\nvar result = isDate('mayonnaise')\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the given argument is an instance of Date"}],"category":"Common Helpers","meta":{"lineno":1,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_date"},"summary":"Is the given argument an instance of Date?","order":0}},{"type":"jsdoc","urlId":"isEqual","category":"Common Helpers","title":"isEqual","description":"Are the given dates equal?","content":{"id":"isEqual","longname":"isEqual","name":"isEqual","kind":"member","scope":"global","description":"Are the given dates equal?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to compare","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to compare","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\nvar result = isEqual(\n new Date(2014, 6, 2, 6, 30, 45, 0)\n new Date(2014, 6, 2, 6, 30, 45, 500)\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are equal"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_equal"},"summary":"Are the given dates equal?","order":0}},{"type":"jsdoc","urlId":"isValid","category":"Common Helpers","title":"isValid","description":"Is the given date valid?","content":{"id":"isValid","longname":"isValid","name":"isValid","kind":"member","scope":"global","description":"Returns false if argument is Invalid Date and true otherwise.\nInvalid Date is a Date, whose time value is NaN.\n\nTime value of Date: http://es5.github.io/#x15.9.1.1","params":[{"type":{"names":["Date"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// For the valid date:\nvar result = isValid(new Date(2014, 1, 31))\n//=> true","// For the invalid date:\nvar result = isValid(new Date(''))\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is valid"}],"category":"Common Helpers","summary":"Is the given date valid?","exceptions":[{"type":{"names":["TypeError"]},"description":"argument must be an instance of Date"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_valid"},"order":0}},{"type":"jsdoc","urlId":"max","category":"Common Helpers","title":"max","description":"Return the latest of the given dates.","content":{"id":"max","longname":"max","name":"max","kind":"member","scope":"global","description":"Return the latest of the given dates.","params":[{"type":{"names":["Array.","Array.","Array."]},"description":"the dates to compare","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which of these dates is the latest?\nvar result = max(\n [\n new Date(1989, 6, 10),\n new Date(1987, 1, 11),\n new Date(1995, 6, 2),\n new Date(1990, 0, 1)\n ]\n)\n//=> Sun Jul 02 1995 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the latest of the dates"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/max"},"summary":"Return the latest of the given dates.","order":0}},{"type":"jsdoc","urlId":"min","category":"Common Helpers","title":"min","description":"Return the earliest of the given dates.","content":{"id":"min","longname":"min","name":"min","kind":"member","scope":"global","description":"Return the earliest of the given dates.","params":[{"type":{"names":["Array.","Array.","Array."]},"description":"the dates to compare","name":"datesArray"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which of these dates is the earliest?\nvar result = min(\n [\n new Date(1989, 6, 10),\n new Date(1987, 1, 11),\n new Date(1995, 6, 2),\n new Date(1990, 0, 1)\n ]\n)\n//=> Wed Feb 11 1987 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the earliest of the dates"}],"category":"Common Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/min"},"summary":"Return the earliest of the given dates.","order":0}},{"type":"jsdoc","urlId":"parse","category":"Common Helpers","title":"parse","description":"Parse the date.","content":{"id":"parse","longname":"parse","name":"parse","kind":"member","scope":"global","description":"Return the date parsed from string using the given format.\n\nAccepted format tokens:\n| Unit | Priority | Token | Input examples |\n|-------------------------|----------|-------|----------------------------------|\n| Year | 10 | YY | 00, 01, ..., 99 |\n| | | YYYY | 1900, 1901, ..., 2099 |\n| ISO week-numbering year | 10 | GG | 00, 01, ..., 99 |\n| | | GGGG | 1900, 1901, ..., 2099 |\n| Quarter | 20 | Q | 1, 2, 3, 4 |\n| | | Qo | 1st, 2nd, 3rd, 4th |\n| Month | 30 | M | 1, 2, ..., 12 |\n| | | Mo | 1st, 2nd, ..., 12th |\n| | | MM | 01, 02, ..., 12 |\n| | | MMM | Jan, Feb, ..., Dec |\n| | | MMMM | January, February, ..., December |\n| ISO week | 40 | W | 1, 2, ..., 53 |\n| | | Wo | 1st, 2nd, ..., 53rd |\n| | | WW | 01, 02, ..., 53 |\n| Day of week | 50 | d | 0, 1, ..., 6 |\n| | | do | 0th, 1st, ..., 6th |\n| | | dd | Su, Mo, ..., Sa |\n| | | ddd | Sun, Mon, ..., Sat |\n| | | dddd | Sunday, Monday, ..., Saturday |\n| Day of ISO week | 50 | E | 1, 2, ..., 7 |\n| Day of month | 50 | D | 1, 2, ..., 31 |\n| | | Do | 1st, 2nd, ..., 31st |\n| | | DD | 01, 02, ..., 31 |\n| Day of year | 50 | DDD | 1, 2, ..., 366 |\n| | | DDDo | 1st, 2nd, ..., 366th |\n| | | DDDD | 001, 002, ..., 366 |\n| Hour | 60 | H | 0, 1, ... 23 |\n| | | HH | 00, 01, ... 23 |\n| | | h | 1, 2, ..., 12 |\n| | | hh | 01, 02, ..., 12 |\n| AM/PM | 65 | A | AM, PM |\n| | | a | am, pm |\n| | | aa | a.m., p.m. |\n| Minute | 70 | m | 0, 1, ..., 59 |\n| | | mm | 00, 01, ..., 59 |\n| Second | 80 | s | 0, 1, ..., 59 |\n| | | ss | 00, 01, ..., 59 |\n| 1/10 of second | 90 | S | 0, 1, ..., 9 |\n| 1/100 of second | 90 | SS | 00, 01, ..., 99 |\n| Millisecond | 90 | SSS | 000, 001, ..., 999 |\n| Timezone | 100 | Z | -01:00, +00:00, ... +12:00 |\n| | | ZZ | -0100, +0000, ..., +1200 |\n| Seconds timestamp | 110 | X | 512969520 |\n| Milliseconds timestamp | 110 | x | 512969520900 |\n\nValues will be assigned to the date in the ascending order of its unit's priority.\nUnits of an equal priority overwrite each other in the order of appearance.\n\nIf no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\nthe values will be taken from 3rd argument `baseDate` which works as a context of parsing.\n\n`baseDate` must be passed for correct work of the function.\nIf you're not sure which `baseDate` to supply, create a new instance of Date:\n`parse('02/11/2014', 'MM/DD/YYYY', new Date())`\nIn this case parsing will be done in the context of the current date.\n\nThe characters wrapped in square brackets in the format string are escaped.\n\nThe result may vary by locale.\n\nIf no format is provided, the string will be parsed using ISO 8601 formats.","params":[{"type":{"names":["String"]},"description":"the string to parse","name":"dateString"},{"type":{"names":["String"]},"description":"the string of tokens","name":"formatString"},{"type":{"names":["Date","String","Number"]},"description":"the date to took the missing higher priority values from","name":"baseDate"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Locale"]},"optional":true,"defaultvalue":"enLocale","description":"the locale object. See [Locale]{@link docs/Locale}","name":"options.locale"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// Parse 11 February 2014 from middle-endian format:\nvar result = parse(\n '02/11/2014',\n 'MM/DD/YYYY',\n new Date()\n)\n//=> Tue Feb 11 2014 00:00:00","// Parse 28th of February in English locale in the context of 2010 year:\nimport eoLocale from 'date-fns/locale/eo'\nvar result = parse(\n '28-a de februaro',\n 'Do [de] MMMM',\n new Date(2010, 0, 1)\n {locale: eoLocale}\n)\n//=> Sun Feb 28 2010 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the parsed date"}],"category":"Common Helpers","meta":{"lineno":10,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/parse"},"summary":"Parse the date.","order":0}},{"type":"jsdoc","urlId":"toDate","category":"Common Helpers","title":"toDate","description":"Convert the given argument to an instance of Date.","content":{"id":"toDate","longname":"toDate","name":"toDate","kind":"member","scope":"global","description":"Convert the given argument to an instance of Date.\n\nIf the argument is an instance of Date, the function returns its clone.\n\nIf the argument is a number, it is treated as a timestamp.\n\nIf an argument is a string, the function tries to parse it.\nFunction accepts complete ISO 8601 formats as well as partial implementations.\nISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n\nIf all above fails, the function passes the given argument to Date constructor.","params":[{"type":{"names":["Date","String","Number"]},"description":"the value to convert","name":"argument"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["0","1","2"]},"optional":true,"defaultvalue":2,"description":"the additional number of digits in the extended year format","name":"options.additionalDigits"}],"examples":["// Convert string '2014-02-11T11:30:30' to date:\nvar result = toDate('2014-02-11T11:30:30')\n//=> Tue Feb 11 2014 11:30:30","// Convert string '+02014101' to date,\n// if the additional number of digits in the extended year format is 1:\nvar result = toDate('+02014101', {additionalDigits: 1})\n//=> Fri Apr 11 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the parsed date in the local time zone"}],"category":"Common Helpers","meta":{"lineno":43,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/to_date"},"summary":"Convert the given argument to an instance of Date.","order":0}}],"Interval Helpers":[{"type":"jsdoc","urlId":"areIntervalsOverlapping","category":"Interval Helpers","title":"areIntervalsOverlapping","description":"Is the given time interval overlapping with another time interval?","content":{"id":"areIntervalsOverlapping","longname":"areIntervalsOverlapping","name":"areIntervalsOverlapping","kind":"member","scope":"global","description":"Is the given time interval overlapping with another time interval?","params":[{"type":{"names":["Interval"]},"description":"the first interval to compare. See [Interval]{@link docs/types/Interval}","name":"intervalLeft"},{"type":{"names":["Interval"]},"description":"the second interval to compare. See [Interval]{@link docs/types/Interval}","name":"intervalRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/types/Options}","name":"options"}],"examples":["// For overlapping time intervals:\nareIntervalsOverlapping(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n)\n//=> true","// For non-overlapping time intervals:\nareIntervalsOverlapping(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 21), end: new Date(2014, 0, 22)}\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"whether the time intervals are overlapping"}],"category":"Interval Helpers","summary":"Is the given time interval overlapping with another time interval?","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/are_intervals_overlapping"},"order":0}},{"type":"jsdoc","urlId":"eachDayOfInterval","category":"Interval Helpers","title":"eachDayOfInterval","description":"Return the array of dates within the specified time interval.","content":{"id":"eachDayOfInterval","longname":"eachDayOfInterval","name":"eachDayOfInterval","kind":"member","scope":"global","description":"Return the array of dates within the specified time interval.","params":[{"type":{"names":["Interval"]},"description":"the interval. See [Interval]{@link docs/types/Interval}","name":"interval"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Each day between 6 October 2014 and 10 October 2014:\nvar result = eachDayOfInterval({\n start: new Date(2014, 9, 6),\n end: new Date(2014, 9, 10)\n})\n//=> [\n// Mon Oct 06 2014 00:00:00,\n// Tue Oct 07 2014 00:00:00,\n// Wed Oct 08 2014 00:00:00,\n// Thu Oct 09 2014 00:00:00,\n// Fri Oct 10 2014 00:00:00\n// ]"],"returns":[{"type":{"names":["Array."]},"description":"the array with starts of days from the day of the interval start to the day of the interval end"}],"category":"Interval Helpers","summary":"Return the array of dates within the specified time interval.","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/each_day_of_interval"},"order":0}},{"type":"jsdoc","urlId":"getOverlappingDaysInIntervals","category":"Interval Helpers","title":"getOverlappingDaysInIntervals","description":"Get the number of days that overlap in two time intervals","content":{"id":"getOverlappingDaysInIntervals","longname":"getOverlappingDaysInIntervals","name":"getOverlappingDaysInIntervals","kind":"member","scope":"global","description":"Get the number of days that overlap in two time intervals","params":[{"type":{"names":["Interval"]},"description":"the first interval to compare. See [Interval]{@link docs/Interval}","name":"intervalLeft"},{"type":{"names":["Interval"]},"description":"the second interval to compare. See [Interval]{@link docs/Interval}","name":"intervalRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// For overlapping time intervals adds 1 for each started overlapping day:\ngetOverlappingDaysInIntervals(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n)\n//=> 3","// For non-overlapping time intervals returns 0:\ngetOverlappingDaysInIntervals(\n {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n {start: new Date(2014, 0, 21), end: new Date(2014, 0, 22)}\n)\n//=> 0"],"returns":[{"type":{"names":["Number"]},"description":"the number of days that overlap in two time intervals"}],"category":"Interval Helpers","summary":"Get the number of days that overlap in two time intervals","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_overlapping_days_in_intervals"},"order":0}},{"type":"jsdoc","urlId":"isWithinInterval","category":"Interval Helpers","title":"isWithinInterval","description":"Is the given date within the interval?","content":{"id":"isWithinInterval","longname":"isWithinInterval","name":"isWithinInterval","kind":"member","scope":"global","description":"Is the given date within the interval?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Interval"]},"description":"the interval to check","name":"interval"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// For the date within the interval:\nisWithinInterval(\n new Date(2014, 0, 3),\n {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)}\n)\n//=> true","// For the date outside of the interval:\nisWithinInterval(\n new Date(2014, 0, 10),\n {start: new Date(2014, 0, 1), end: new Date(2014, 0, 7)}\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is within the interval"}],"category":"Interval Helpers","summary":"Is the given date within the interval?","exceptions":[{"type":{"names":["Error"]},"description":"The start of an interval cannot be after its end"}],"meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_within_interval"},"order":0}}],"Timestamp Helpers":[{"type":"jsdoc","urlId":"getTime","category":"Timestamp Helpers","title":"getTime","description":"Get the milliseconds timestamp of the given date.","content":{"id":"getTime","longname":"getTime","name":"getTime","kind":"member","scope":"global","description":"Get the milliseconds timestamp of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the timestamp of 29 February 2012 11:45:05.123:\nvar result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n//=> 1330515905123"],"returns":[{"type":{"names":["Number"]},"description":"the timestamp"}],"category":"Timestamp Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_time"},"summary":"Get the milliseconds timestamp of the given date.","order":0}}],"Millisecond Helpers":[{"type":"jsdoc","urlId":"addMilliseconds","category":"Millisecond Helpers","title":"addMilliseconds","description":"Add the specified number of milliseconds to the given date.","content":{"id":"addMilliseconds","longname":"addMilliseconds","name":"addMilliseconds","kind":"member","scope":"global","description":"Add the specified number of milliseconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of milliseconds to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 750 milliseconds to 10 July 2014 12:45:30.000:\nvar result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n//=> Thu Jul 10 2014 12:45:30.750"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the milliseconds added"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_milliseconds"},"summary":"Add the specified number of milliseconds to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInMilliseconds","category":"Millisecond Helpers","title":"differenceInMilliseconds","description":"Get the number of milliseconds between the given dates.","content":{"id":"differenceInMilliseconds","longname":"differenceInMilliseconds","name":"differenceInMilliseconds","kind":"member","scope":"global","description":"Get the number of milliseconds between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many milliseconds are between\n// 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\nvar result = differenceInMilliseconds(\n new Date(2014, 6, 2, 12, 30, 20, 600),\n new Date(2014, 6, 2, 12, 30, 21, 700)\n)\n//=> 1100"],"returns":[{"type":{"names":["Number"]},"description":"the number of milliseconds"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_milliseconds"},"summary":"Get the number of milliseconds between the given dates.","order":0}},{"type":"jsdoc","urlId":"getMilliseconds","category":"Millisecond Helpers","title":"getMilliseconds","description":"Get the milliseconds of the given date.","content":{"id":"getMilliseconds","longname":"getMilliseconds","name":"getMilliseconds","kind":"member","scope":"global","description":"Get the milliseconds of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the milliseconds of 29 February 2012 11:45:05.123:\nvar result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n//=> 123"],"returns":[{"type":{"names":["Number"]},"description":"the milliseconds"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_milliseconds"},"summary":"Get the milliseconds of the given date.","order":0}},{"type":"jsdoc","urlId":"setMilliseconds","category":"Millisecond Helpers","title":"setMilliseconds","description":"Set the milliseconds to the given date.","content":{"id":"setMilliseconds","longname":"setMilliseconds","name":"setMilliseconds","kind":"member","scope":"global","description":"Set the milliseconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the milliseconds of the new date","name":"milliseconds"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 300 milliseconds to 1 September 2014 11:30:40.500:\nvar result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n//=> Mon Sep 01 2014 11:30:40.300"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the milliseconds setted"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_milliseconds"},"summary":"Set the milliseconds to the given date.","order":0}},{"type":"jsdoc","urlId":"subMilliseconds","category":"Millisecond Helpers","title":"subMilliseconds","description":"Subtract the specified number of milliseconds from the given date.","content":{"id":"subMilliseconds","longname":"subMilliseconds","name":"subMilliseconds","kind":"member","scope":"global","description":"Subtract the specified number of milliseconds from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of milliseconds to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\nvar result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n//=> Thu Jul 10 2014 12:45:29.250"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the milliseconds subtracted"}],"category":"Millisecond Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_milliseconds"},"summary":"Subtract the specified number of milliseconds from the given date.","order":0}}],"Second Helpers":[{"type":"jsdoc","urlId":"addSeconds","category":"Second Helpers","title":"addSeconds","description":"Add the specified number of seconds to the given date.","content":{"id":"addSeconds","longname":"addSeconds","name":"addSeconds","kind":"member","scope":"global","description":"Add the specified number of seconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of seconds to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 30 seconds to 10 July 2014 12:45:00:\nvar result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n//=> Thu Jul 10 2014 12:45:30"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the seconds added"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_seconds"},"summary":"Add the specified number of seconds to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInSeconds","category":"Second Helpers","title":"differenceInSeconds","description":"Get the number of seconds between the given dates.","content":{"id":"differenceInSeconds","longname":"differenceInSeconds","name":"differenceInSeconds","kind":"member","scope":"global","description":"Get the number of seconds between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many seconds are between\n// 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\nvar result = differenceInSeconds(\n new Date(2014, 6, 2, 12, 30, 7, 999),\n new Date(2014, 6, 2, 12, 30, 20, 0)\n)\n//=> 12"],"returns":[{"type":{"names":["Number"]},"description":"the number of seconds"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_seconds"},"summary":"Get the number of seconds between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfSecond","category":"Second Helpers","title":"endOfSecond","description":"Return the end of a second for the given date.","content":{"id":"endOfSecond","longname":"endOfSecond","name":"endOfSecond","kind":"member","scope":"global","description":"Return the end of a second for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a second for 1 December 2014 22:15:45.400:\nvar result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:45.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a second"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_second"},"summary":"Return the end of a second for the given date.","order":0}},{"type":"jsdoc","urlId":"getSeconds","category":"Second Helpers","title":"getSeconds","description":"Get the seconds of the given date.","content":{"id":"getSeconds","longname":"getSeconds","name":"getSeconds","kind":"member","scope":"global","description":"Get the seconds of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the seconds of 29 February 2012 11:45:05.123:\nvar result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n//=> 5"],"returns":[{"type":{"names":["Number"]},"description":"the seconds"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_seconds"},"summary":"Get the seconds of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameSecond","category":"Second Helpers","title":"isSameSecond","description":"Are the given dates in the same second?","content":{"id":"isSameSecond","longname":"isSameSecond","name":"isSameSecond","kind":"member","scope":"global","description":"Are the given dates in the same second?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500\n// in the same second?\nvar result = isSameSecond(\n new Date(2014, 8, 4, 6, 30, 15),\n new Date(2014, 8, 4, 6, 30, 15, 500)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same second"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_second"},"summary":"Are the given dates in the same second?","order":0}},{"type":"jsdoc","urlId":"setSeconds","category":"Second Helpers","title":"setSeconds","description":"Set the seconds to the given date.","content":{"id":"setSeconds","longname":"setSeconds","name":"setSeconds","kind":"member","scope":"global","description":"Set the seconds to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the seconds of the new date","name":"seconds"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 45 seconds to 1 September 2014 11:30:40:\nvar result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n//=> Mon Sep 01 2014 11:30:45"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the seconds setted"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_seconds"},"summary":"Set the seconds to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfSecond","category":"Second Helpers","title":"startOfSecond","description":"Return the start of a second for the given date.","content":{"id":"startOfSecond","longname":"startOfSecond","name":"startOfSecond","kind":"member","scope":"global","description":"Return the start of a second for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a second for 1 December 2014 22:15:45.400:\nvar result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:45.000"],"returns":[{"type":{"names":["Date"]},"description":"the start of a second"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_second"},"summary":"Return the start of a second for the given date.","order":0}},{"type":"jsdoc","urlId":"subSeconds","category":"Second Helpers","title":"subSeconds","description":"Subtract the specified number of seconds from the given date.","content":{"id":"subSeconds","longname":"subSeconds","name":"subSeconds","kind":"member","scope":"global","description":"Subtract the specified number of seconds from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of seconds to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 30 seconds from 10 July 2014 12:45:00:\nvar result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n//=> Thu Jul 10 2014 12:44:30"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the seconds subtracted"}],"category":"Second Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_seconds"},"summary":"Subtract the specified number of seconds from the given date.","order":0}}],"Minute Helpers":[{"type":"jsdoc","urlId":"addMinutes","category":"Minute Helpers","title":"addMinutes","description":"Add the specified number of minutes to the given date.","content":{"id":"addMinutes","longname":"addMinutes","name":"addMinutes","kind":"member","scope":"global","description":"Add the specified number of minutes to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of minutes to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 30 minutes to 10 July 2014 12:00:00:\nvar result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n//=> Thu Jul 10 2014 12:30:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the minutes added"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_minutes"},"summary":"Add the specified number of minutes to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInMinutes","category":"Minute Helpers","title":"differenceInMinutes","description":"Get the number of minutes between the given dates.","content":{"id":"differenceInMinutes","longname":"differenceInMinutes","name":"differenceInMinutes","kind":"member","scope":"global","description":"Get the number of minutes between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\nvar result = differenceInMinutes(\n new Date(2014, 6, 2, 12, 7, 59),\n new Date(2014, 6, 2, 12, 20, 0)\n)\n//=> 12"],"returns":[{"type":{"names":["Number"]},"description":"the number of minutes"}],"category":"Minute Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_minutes"},"summary":"Get the number of minutes between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfMinute","category":"Minute Helpers","title":"endOfMinute","description":"Return the end of a minute for the given date.","content":{"id":"endOfMinute","longname":"endOfMinute","name":"endOfMinute","kind":"member","scope":"global","description":"Return the end of a minute for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a minute for 1 December 2014 22:15:45.400:\nvar result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a minute"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_minute"},"summary":"Return the end of a minute for the given date.","order":0}},{"type":"jsdoc","urlId":"getMinutes","category":"Minute Helpers","title":"getMinutes","description":"Get the minutes of the given date.","content":{"id":"getMinutes","longname":"getMinutes","name":"getMinutes","kind":"member","scope":"global","description":"Get the minutes of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the minutes of 29 February 2012 11:45:05:\nvar result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n//=> 45"],"returns":[{"type":{"names":["Number"]},"description":"the minutes"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_minutes"},"summary":"Get the minutes of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameMinute","category":"Minute Helpers","title":"isSameMinute","description":"Are the given dates in the same minute?","content":{"id":"isSameMinute","longname":"isSameMinute","name":"isSameMinute","kind":"member","scope":"global","description":"Are the given dates in the same minute?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15\n// in the same minute?\nvar result = isSameMinute(\n new Date(2014, 8, 4, 6, 30),\n new Date(2014, 8, 4, 6, 30, 15)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same minute"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_minute"},"summary":"Are the given dates in the same minute?","order":0}},{"type":"jsdoc","urlId":"setMinutes","category":"Minute Helpers","title":"setMinutes","description":"Set the minutes to the given date.","content":{"id":"setMinutes","longname":"setMinutes","name":"setMinutes","kind":"member","scope":"global","description":"Set the minutes to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the minutes of the new date","name":"minutes"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 45 minutes to 1 September 2014 11:30:40:\nvar result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n//=> Mon Sep 01 2014 11:45:40"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the minutes setted"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_minutes"},"summary":"Set the minutes to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfMinute","category":"Minute Helpers","title":"startOfMinute","description":"Return the start of a minute for the given date.","content":{"id":"startOfMinute","longname":"startOfMinute","name":"startOfMinute","kind":"member","scope":"global","description":"Return the start of a minute for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a minute for 1 December 2014 22:15:45.400:\nvar result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n//=> Mon Dec 01 2014 22:15:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a minute"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_minute"},"summary":"Return the start of a minute for the given date.","order":0}},{"type":"jsdoc","urlId":"subMinutes","category":"Minute Helpers","title":"subMinutes","description":"Subtract the specified number of minutes from the given date.","content":{"id":"subMinutes","longname":"subMinutes","name":"subMinutes","kind":"member","scope":"global","description":"Subtract the specified number of minutes from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of minutes to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 30 minutes from 10 July 2014 12:00:00:\nvar result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n//=> Thu Jul 10 2014 11:30:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the mintues subtracted"}],"category":"Minute Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_minutes"},"summary":"Subtract the specified number of minutes from the given date.","order":0}}],"Hour Helpers":[{"type":"jsdoc","urlId":"addHours","category":"Hour Helpers","title":"addHours","description":"Add the specified number of hours to the given date.","content":{"id":"addHours","longname":"addHours","name":"addHours","kind":"member","scope":"global","description":"Add the specified number of hours to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of hours to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 2 hours to 10 July 2014 23:00:00:\nvar result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n//=> Fri Jul 11 2014 01:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the hours added"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_hours"},"summary":"Add the specified number of hours to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInHours","category":"Hour Helpers","title":"differenceInHours","description":"Get the number of hours between the given dates.","content":{"id":"differenceInHours","longname":"differenceInHours","name":"differenceInHours","kind":"member","scope":"global","description":"Get the number of hours between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\nvar result = differenceInHours(\n new Date(2014, 6, 2, 6, 50),\n new Date(2014, 6, 2, 19, 0)\n)\n//=> 12"],"returns":[{"type":{"names":["Number"]},"description":"the number of hours"}],"category":"Hour Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_hours"},"summary":"Get the number of hours between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfHour","category":"Hour Helpers","title":"endOfHour","description":"Return the end of an hour for the given date.","content":{"id":"endOfHour","longname":"endOfHour","name":"endOfHour","kind":"member","scope":"global","description":"Return the end of an hour for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of an hour for 2 September 2014 11:55:00:\nvar result = endOfHour(new Date(2014, 8, 2, 11, 55))\n//=> Tue Sep 02 2014 11:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of an hour"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_hour"},"summary":"Return the end of an hour for the given date.","order":0}},{"type":"jsdoc","urlId":"getHours","category":"Hour Helpers","title":"getHours","description":"Get the hours of the given date.","content":{"id":"getHours","longname":"getHours","name":"getHours","kind":"member","scope":"global","description":"Get the hours of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Get the hours of 29 February 2012 11:45:00:\nvar result = getHours(new Date(2012, 1, 29, 11, 45))\n//=> 11"],"returns":[{"type":{"names":["Number"]},"description":"the hours"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_hours"},"summary":"Get the hours of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameHour","category":"Hour Helpers","title":"isSameHour","description":"Are the given dates in the same hour?","content":{"id":"isSameHour","longname":"isSameHour","name":"isSameHour","kind":"member","scope":"global","description":"Are the given dates in the same hour?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?\nvar result = isSameHour(\n new Date(2014, 8, 4, 6, 0),\n new Date(2014, 8, 4, 6, 30)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same hour"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_hour"},"summary":"Are the given dates in the same hour?","order":0}},{"type":"jsdoc","urlId":"setHours","category":"Hour Helpers","title":"setHours","description":"Set the hours to the given date.","content":{"id":"setHours","longname":"setHours","name":"setHours","kind":"member","scope":"global","description":"Set the hours to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the hours of the new date","name":"hours"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set 4 hours to 1 September 2014 11:30:00:\nvar result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n//=> Mon Sep 01 2014 04:30:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the hours setted"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_hours"},"summary":"Set the hours to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfHour","category":"Hour Helpers","title":"startOfHour","description":"Return the start of an hour for the given date.","content":{"id":"startOfHour","longname":"startOfHour","name":"startOfHour","kind":"member","scope":"global","description":"Return the start of an hour for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of an hour for 2 September 2014 11:55:00:\nvar result = startOfHour(new Date(2014, 8, 2, 11, 55))\n//=> Tue Sep 02 2014 11:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of an hour"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_hour"},"summary":"Return the start of an hour for the given date.","order":0}},{"type":"jsdoc","urlId":"subHours","category":"Hour Helpers","title":"subHours","description":"Subtract the specified number of hours from the given date.","content":{"id":"subHours","longname":"subHours","name":"subHours","kind":"member","scope":"global","description":"Subtract the specified number of hours from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of hours to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 2 hours from 11 July 2014 01:00:00:\nvar result = subHours(new Date(2014, 6, 11, 1, 0), 2)\n//=> Thu Jul 10 2014 23:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the hours subtracted"}],"category":"Hour Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_hours"},"summary":"Subtract the specified number of hours from the given date.","order":0}}],"Day Helpers":[{"type":"jsdoc","urlId":"addDays","category":"Day Helpers","title":"addDays","description":"Add the specified number of days to the given date.","content":{"id":"addDays","longname":"addDays","name":"addDays","kind":"member","scope":"global","description":"Add the specified number of days to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of days to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 10 days to 1 September 2014:\nvar result = addDays(new Date(2014, 8, 1), 10)\n//=> Thu Sep 11 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the days added"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_days"},"summary":"Add the specified number of days to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarDays","category":"Day Helpers","title":"differenceInCalendarDays","description":"Get the number of calendar days between the given dates.","content":{"id":"differenceInCalendarDays","longname":"differenceInCalendarDays","name":"differenceInCalendarDays","kind":"member","scope":"global","description":"Get the number of calendar days between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar days are between\n// 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\nvar result = differenceInCalendarDays(\n new Date(2011, 6, 2, 23, 0),\n new Date(2012, 6, 2, 0, 0)\n)\n//=> 366"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar days"}],"category":"Day Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_days"},"summary":"Get the number of calendar days between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInDays","category":"Day Helpers","title":"differenceInDays","description":"Get the number of full days between the given dates.","content":{"id":"differenceInDays","longname":"differenceInDays","name":"differenceInDays","kind":"member","scope":"global","description":"Get the number of full days between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full days are between\n// 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\nvar result = differenceInDays(\n new Date(2011, 6, 2, 23, 0),\n new Date(2012, 6, 2, 0, 0)\n)\n//=> 365"],"returns":[{"type":{"names":["Number"]},"description":"the number of full days"}],"category":"Day Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_days"},"summary":"Get the number of full days between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfDay","category":"Day Helpers","title":"endOfDay","description":"Return the end of a day for the given date.","content":{"id":"endOfDay","longname":"endOfDay","name":"endOfDay","kind":"member","scope":"global","description":"Return the end of a day for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a day for 2 September 2014 11:55:00:\nvar result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 02 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a day"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_day"},"summary":"Return the end of a day for the given date.","order":0}},{"type":"jsdoc","urlId":"getDate","category":"Day Helpers","title":"getDate","description":"Get the day of the month of the given date.","content":{"id":"getDate","longname":"getDate","name":"getDate","kind":"member","scope":"global","description":"Get the day of the month of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the month is 29 February 2012?\nvar result = getDate(new Date(2012, 1, 29))\n//=> 29"],"returns":[{"type":{"names":["Number"]},"description":"the day of month"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_date"},"summary":"Get the day of the month of the given date.","order":0}},{"type":"jsdoc","urlId":"getDayOfYear","category":"Day Helpers","title":"getDayOfYear","description":"Get the day of the year of the given date.","content":{"id":"getDayOfYear","longname":"getDayOfYear","name":"getDayOfYear","kind":"member","scope":"global","description":"Get the day of the year of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the year is 2 July 2014?\nvar result = getDayOfYear(new Date(2014, 6, 2))\n//=> 183"],"returns":[{"type":{"names":["Number"]},"description":"the day of year"}],"category":"Day Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_day_of_year"},"summary":"Get the day of the year of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameDay","category":"Day Helpers","title":"isSameDay","description":"Are the given dates in the same day?","content":{"id":"isSameDay","longname":"isSameDay","name":"isSameDay","kind":"member","scope":"global","description":"Are the given dates in the same day?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\nvar result = isSameDay(\n new Date(2014, 8, 4, 6, 0),\n new Date(2014, 8, 4, 18, 0)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same day"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_day"},"summary":"Are the given dates in the same day?","order":0}},{"type":"jsdoc","urlId":"setDate","category":"Day Helpers","title":"setDate","description":"Set the day of the month to the given date.","content":{"id":"setDate","longname":"setDate","name":"setDate","kind":"member","scope":"global","description":"Set the day of the month to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the month of the new date","name":"dayOfMonth"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 30th day of the month to 1 September 2014:\nvar result = setDate(new Date(2014, 8, 1), 30)\n//=> Tue Sep 30 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the month setted"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_date"},"summary":"Set the day of the month to the given date.","order":0}},{"type":"jsdoc","urlId":"setDayOfYear","category":"Day Helpers","title":"setDayOfYear","description":"Set the day of the year to the given date.","content":{"id":"setDayOfYear","longname":"setDayOfYear","name":"setDayOfYear","kind":"member","scope":"global","description":"Set the day of the year to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the year of the new date","name":"dayOfYear"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 2nd day of the year to 2 July 2014:\nvar result = setDayOfYear(new Date(2014, 6, 2), 2)\n//=> Thu Jan 02 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the year setted"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_day_of_year"},"summary":"Set the day of the year to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfDay","category":"Day Helpers","title":"startOfDay","description":"Return the start of a day for the given date.","content":{"id":"startOfDay","longname":"startOfDay","name":"startOfDay","kind":"member","scope":"global","description":"Return the start of a day for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a day for 2 September 2014 11:55:00:\nvar result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 02 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a day"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_day"},"summary":"Return the start of a day for the given date.","order":0}},{"type":"jsdoc","urlId":"subDays","category":"Day Helpers","title":"subDays","description":"Subtract the specified number of days from the given date.","content":{"id":"subDays","longname":"subDays","name":"subDays","kind":"member","scope":"global","description":"Subtract the specified number of days from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of days to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 10 days from 1 September 2014:\nvar result = subDays(new Date(2014, 8, 1), 10)\n//=> Fri Aug 22 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the days subtracted"}],"category":"Day Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_days"},"summary":"Subtract the specified number of days from the given date.","order":0}}],"Weekday Helpers":[{"type":"jsdoc","urlId":"getDay","category":"Weekday Helpers","title":"getDay","description":"Get the day of the week of the given date.","content":{"id":"getDay","longname":"getDay","name":"getDay","kind":"member","scope":"global","description":"Get the day of the week of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the week is 29 February 2012?\nvar result = getDay(new Date(2012, 1, 29))\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the day of week"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_day"},"summary":"Get the day of the week of the given date.","order":0}},{"type":"jsdoc","urlId":"getISODay","category":"Weekday Helpers","title":"getISODay","description":"Get the day of the ISO week of the given date.","content":{"id":"getISODay","longname":"getISODay","name":"getISODay","kind":"member","scope":"global","description":"Get the day of the ISO week of the given date,\nwhich is 7 for Sunday, 1 for Monday etc.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which day of the ISO week is 26 February 2012?\nvar result = getISODay(new Date(2012, 1, 26))\n//=> 7"],"returns":[{"type":{"names":["Number"]},"description":"the day of ISO week"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_day"},"summary":"Get the day of the ISO week of the given date.","order":0}},{"type":"jsdoc","urlId":"isFriday","category":"Weekday Helpers","title":"isFriday","description":"Is the given date Friday?","content":{"id":"isFriday","longname":"isFriday","name":"isFriday","kind":"member","scope":"global","description":"Is the given date Friday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 26 September 2014 Friday?\nvar result = isFriday(new Date(2014, 8, 26))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Friday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_friday"},"summary":"Is the given date Friday?","order":0}},{"type":"jsdoc","urlId":"isMonday","category":"Weekday Helpers","title":"isMonday","description":"Is the given date Monday?","content":{"id":"isMonday","longname":"isMonday","name":"isMonday","kind":"member","scope":"global","description":"Is the given date Monday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 22 September 2014 Monday?\nvar result = isMonday(new Date(2014, 8, 22))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Monday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_monday"},"summary":"Is the given date Monday?","order":0}},{"type":"jsdoc","urlId":"isSaturday","category":"Weekday Helpers","title":"isSaturday","description":"Is the given date Saturday?","content":{"id":"isSaturday","longname":"isSaturday","name":"isSaturday","kind":"member","scope":"global","description":"Is the given date Saturday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 27 September 2014 Saturday?\nvar result = isSaturday(new Date(2014, 8, 27))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Saturday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_saturday"},"summary":"Is the given date Saturday?","order":0}},{"type":"jsdoc","urlId":"isSunday","category":"Weekday Helpers","title":"isSunday","description":"Is the given date Sunday?","content":{"id":"isSunday","longname":"isSunday","name":"isSunday","kind":"member","scope":"global","description":"Is the given date Sunday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 21 September 2014 Sunday?\nvar result = isSunday(new Date(2014, 8, 21))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Sunday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_sunday"},"summary":"Is the given date Sunday?","order":0}},{"type":"jsdoc","urlId":"isThursday","category":"Weekday Helpers","title":"isThursday","description":"Is the given date Thursday?","content":{"id":"isThursday","longname":"isThursday","name":"isThursday","kind":"member","scope":"global","description":"Is the given date Thursday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 25 September 2014 Thursday?\nvar result = isThursday(new Date(2014, 8, 25))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Thursday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_thursday"},"summary":"Is the given date Thursday?","order":0}},{"type":"jsdoc","urlId":"isTuesday","category":"Weekday Helpers","title":"isTuesday","description":"Is the given date Tuesday?","content":{"id":"isTuesday","longname":"isTuesday","name":"isTuesday","kind":"member","scope":"global","description":"Is the given date Tuesday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 23 September 2014 Tuesday?\nvar result = isTuesday(new Date(2014, 8, 23))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Tuesday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_tuesday"},"summary":"Is the given date Tuesday?","order":0}},{"type":"jsdoc","urlId":"isWednesday","category":"Weekday Helpers","title":"isWednesday","description":"Is the given date Wednesday?","content":{"id":"isWednesday","longname":"isWednesday","name":"isWednesday","kind":"member","scope":"global","description":"Is the given date Wednesday?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 24 September 2014 Wednesday?\nvar result = isWednesday(new Date(2014, 8, 24))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is Wednesday"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_wednesday"},"summary":"Is the given date Wednesday?","order":0}},{"type":"jsdoc","urlId":"isWeekend","category":"Weekday Helpers","title":"isWeekend","description":"Does the given date fall on a weekend?","content":{"id":"isWeekend","longname":"isWeekend","name":"isWeekend","kind":"member","scope":"global","description":"Does the given date fall on a weekend?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Does 5 October 2014 fall on a weekend?\nvar result = isWeekend(new Date(2014, 9, 5))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date falls on a weekend"}],"category":"Weekday Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_weekend"},"summary":"Does the given date fall on a weekend?","order":0}},{"type":"jsdoc","urlId":"setDay","category":"Weekday Helpers","title":"setDay","description":"Set the day of the week to the given date.","content":{"id":"setDay","longname":"setDay","name":"setDay","kind":"member","scope":"global","description":"Set the day of the week to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the week of the new date","name":"day"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// Set Sunday to 1 September 2014:\nvar result = setDay(new Date(2014, 8, 1), 0)\n//=> Sun Aug 31 2014 00:00:00","// If week starts with Monday, set Sunday to 1 September 2014:\nvar result = setDay(new Date(2014, 8, 1), 0, {weekStartsOn: 1})\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the week setted"}],"category":"Weekday Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_day"},"summary":"Set the day of the week to the given date.","order":0}},{"type":"jsdoc","urlId":"setISODay","category":"Weekday Helpers","title":"setISODay","description":"Set the day of the ISO week to the given date.","content":{"id":"setISODay","longname":"setISODay","name":"setISODay","kind":"member","scope":"global","description":"Set the day of the ISO week to the given date.\nISO week starts with Monday.\n7 is the index of Sunday, 1 is the index of Monday etc.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the day of the ISO week of the new date","name":"day"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set Sunday to 1 September 2014:\nvar result = setISODay(new Date(2014, 8, 1), 7)\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the day of the ISO week setted"}],"category":"Weekday Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_iso_day"},"summary":"Set the day of the ISO week to the given date.","order":0}}],"Week Helpers":[{"type":"jsdoc","urlId":"addWeeks","category":"Week Helpers","title":"addWeeks","description":"Add the specified number of weeks to the given date.","content":{"id":"addWeeks","longname":"addWeeks","name":"addWeeks","kind":"member","scope":"global","description":"Add the specified number of week to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of weeks to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 4 weeks to 1 September 2014:\nvar result = addWeeks(new Date(2014, 8, 1), 4)\n//=> Mon Sep 29 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the weeks added"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_weeks"},"summary":"Add the specified number of weeks to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarWeeks","category":"Week Helpers","title":"differenceInCalendarWeeks","description":"Get the number of calendar weeks between the given dates.","content":{"id":"differenceInCalendarWeeks","longname":"differenceInCalendarWeeks","name":"differenceInCalendarWeeks","kind":"member","scope":"global","description":"Get the number of calendar weeks between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// How many calendar weeks are between 5 July 2014 and 20 July 2014?\nvar result = differenceInCalendarWeeks(\n new Date(2014, 6, 5),\n new Date(2014, 6, 20)\n)\n//=> 3","// If the week starts on Monday,\n// how many calendar weeks are between 5 July 2014 and 20 July 2014?\nvar result = differenceInCalendarWeeks(\n new Date(2014, 6, 5),\n new Date(2014, 6, 20),\n {weekStartsOn: 1}\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar weeks"}],"category":"Week Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_weeks"},"summary":"Get the number of calendar weeks between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInWeeks","category":"Week Helpers","title":"differenceInWeeks","description":"Get the number of full weeks between the given dates.","content":{"id":"differenceInWeeks","longname":"differenceInWeeks","name":"differenceInWeeks","kind":"member","scope":"global","description":"Get the number of full weeks between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full weeks are between 5 July 2014 and 20 July 2014?\nvar result = differenceInWeeks(\n new Date(2014, 6, 5),\n new Date(2014, 6, 20)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of full weeks"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_weeks"},"summary":"Get the number of full weeks between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfWeek","category":"Week Helpers","title":"endOfWeek","description":"Return the end of a week for the given date.","content":{"id":"endOfWeek","longname":"endOfWeek","name":"endOfWeek","kind":"member","scope":"global","description":"Return the end of a week for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// The end of a week for 2 September 2014 11:55:00:\nvar result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sat Sep 06 2014 23:59:59.999","// If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\nvar result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n//=> Sun Sep 07 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_week"},"summary":"Return the end of a week for the given date.","order":0}},{"type":"jsdoc","urlId":"isSameWeek","category":"Week Helpers","title":"isSameWeek","description":"Are the given dates in the same week?","content":{"id":"isSameWeek","longname":"isSameWeek","name":"isSameWeek","kind":"member","scope":"global","description":"Are the given dates in the same week?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// Are 31 August 2014 and 4 September 2014 in the same week?\nvar result = isSameWeek(\n new Date(2014, 7, 31),\n new Date(2014, 8, 4)\n)\n//=> true","// If week starts with Monday,\n// are 31 August 2014 and 4 September 2014 in the same week?\nvar result = isSameWeek(\n new Date(2014, 7, 31),\n new Date(2014, 8, 4),\n {weekStartsOn: 1}\n)\n//=> false"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_week"},"summary":"Are the given dates in the same week?","order":0}},{"type":"jsdoc","urlId":"lastDayOfWeek","category":"Week Helpers","title":"lastDayOfWeek","description":"Return the last day of a week for the given date.","content":{"id":"lastDayOfWeek","longname":"lastDayOfWeek","name":"lastDayOfWeek","kind":"member","scope":"global","description":"Return the last day of a week for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// The last day of a week for 2 September 2014 11:55:00:\nvar result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sat Sep 06 2014 00:00:00","// If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00:\nvar result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_week"},"summary":"Return the last day of a week for the given date.","order":0}},{"type":"jsdoc","urlId":"startOfWeek","category":"Week Helpers","title":"startOfWeek","description":"Return the start of a week for the given date.","content":{"id":"startOfWeek","longname":"startOfWeek","name":"startOfWeek","kind":"member","scope":"global","description":"Return the start of a week for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"},{"type":{"names":["Number"]},"optional":true,"defaultvalue":0,"description":"the index of the first day of the week (0 - Sunday)","name":"options.weekStartsOn"}],"examples":["// The start of a week for 2 September 2014 11:55:00:\nvar result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sun Aug 31 2014 00:00:00","// If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\nvar result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a week"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_week"},"summary":"Return the start of a week for the given date.","order":0}},{"type":"jsdoc","urlId":"subWeeks","category":"Week Helpers","title":"subWeeks","description":"Subtract the specified number of weeks from the given date.","content":{"id":"subWeeks","longname":"subWeeks","name":"subWeeks","kind":"member","scope":"global","description":"Subtract the specified number of weeks from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of weeks to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 4 weeks from 1 September 2014:\nvar result = subWeeks(new Date(2014, 8, 1), 4)\n//=> Mon Aug 04 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the weeks subtracted"}],"category":"Week Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_weeks"},"summary":"Subtract the specified number of weeks from the given date.","order":0}}],"ISO Week Helpers":[{"type":"jsdoc","urlId":"differenceInCalendarISOWeeks","category":"ISO Week Helpers","title":"differenceInCalendarISOWeeks","description":"Get the number of calendar ISO weeks between the given dates.","content":{"id":"differenceInCalendarISOWeeks","longname":"differenceInCalendarISOWeeks","name":"differenceInCalendarISOWeeks","kind":"member","scope":"global","description":"Get the number of calendar ISO weeks between the given dates.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?\nvar result = differenceInCalendarISOWeeks(\n new Date(2014, 6, 6),\n new Date(2014, 6, 21)\n)\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar ISO weeks"}],"category":"ISO Week Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_iso_weeks"},"summary":"Get the number of calendar ISO weeks between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfISOWeek","category":"ISO Week Helpers","title":"endOfISOWeek","description":"Return the end of an ISO week for the given date.","content":{"id":"endOfISOWeek","longname":"endOfISOWeek","name":"endOfISOWeek","kind":"member","scope":"global","description":"Return the end of an ISO week for the given date.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of an ISO week for 2 September 2014 11:55:00:\nvar result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sun Sep 07 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of an ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_iso_week"},"summary":"Return the end of an ISO week for the given date.","order":0}},{"type":"jsdoc","urlId":"getISOWeek","category":"ISO Week Helpers","title":"getISOWeek","description":"Get the ISO week of the given date.","content":{"id":"getISOWeek","longname":"getISOWeek","name":"getISOWeek","kind":"member","scope":"global","description":"Get the ISO week of the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which week of the ISO-week numbering year is 2 January 2005?\nvar result = getISOWeek(new Date(2005, 0, 2))\n//=> 53"],"returns":[{"type":{"names":["Number"]},"description":"the ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":7,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_week"},"summary":"Get the ISO week of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameISOWeek","category":"ISO Week Helpers","title":"isSameISOWeek","description":"Are the given dates in the same ISO week?","content":{"id":"isSameISOWeek","longname":"isSameISOWeek","name":"isSameISOWeek","kind":"member","scope":"global","description":"Are the given dates in the same ISO week?\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 1 September 2014 and 7 September 2014 in the same ISO week?\nvar result = isSameISOWeek(\n new Date(2014, 8, 1),\n new Date(2014, 8, 7)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_iso_week"},"summary":"Are the given dates in the same ISO week?","order":0}},{"type":"jsdoc","urlId":"lastDayOfISOWeek","category":"ISO Week Helpers","title":"lastDayOfISOWeek","description":"Return the last day of an ISO week for the given date.","content":{"id":"lastDayOfISOWeek","longname":"lastDayOfISOWeek","name":"lastDayOfISOWeek","kind":"member","scope":"global","description":"Return the last day of an ISO week for the given date.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of an ISO week for 2 September 2014 11:55:00:\nvar result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Sun Sep 07 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of an ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_iso_week"},"summary":"Return the last day of an ISO week for the given date.","order":0}},{"type":"jsdoc","urlId":"setISOWeek","category":"ISO Week Helpers","title":"setISOWeek","description":"Set the ISO week to the given date.","content":{"id":"setISOWeek","longname":"setISOWeek","name":"setISOWeek","kind":"member","scope":"global","description":"Set the ISO week to the given date, saving the weekday number.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the ISO week of the new date","name":"isoWeek"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 53rd ISO week to 7 August 2004:\nvar result = setISOWeek(new Date(2004, 7, 7), 53)\n//=> Sat Jan 01 2005 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week setted"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_iso_week"},"summary":"Set the ISO week to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfISOWeek","category":"ISO Week Helpers","title":"startOfISOWeek","description":"Return the start of an ISO week for the given date.","content":{"id":"startOfISOWeek","longname":"startOfISOWeek","name":"startOfISOWeek","kind":"member","scope":"global","description":"Return the start of an ISO week for the given date.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of an ISO week for 2 September 2014 11:55:00:\nvar result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of an ISO week"}],"category":"ISO Week Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_iso_week"},"summary":"Return the start of an ISO week for the given date.","order":0}}],"Month Helpers":[{"type":"jsdoc","urlId":"addMonths","category":"Month Helpers","title":"addMonths","description":"Add the specified number of months to the given date.","content":{"id":"addMonths","longname":"addMonths","name":"addMonths","kind":"member","scope":"global","description":"Add the specified number of months to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of months to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 5 months to 1 September 2014:\nvar result = addMonths(new Date(2014, 8, 1), 5)\n//=> Sun Feb 01 2015 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the months added"}],"category":"Month Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_months"},"summary":"Add the specified number of months to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarMonths","category":"Month Helpers","title":"differenceInCalendarMonths","description":"Get the number of calendar months between the given dates.","content":{"id":"differenceInCalendarMonths","longname":"differenceInCalendarMonths","name":"differenceInCalendarMonths","kind":"member","scope":"global","description":"Get the number of calendar months between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar months are between 31 January 2014 and 1 September 2014?\nvar result = differenceInCalendarMonths(\n new Date(2014, 0, 31),\n new Date(2014, 8, 1)\n)\n//=> 8"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar months"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_months"},"summary":"Get the number of calendar months between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInMonths","category":"Month Helpers","title":"differenceInMonths","description":"Get the number of full months between the given dates.","content":{"id":"differenceInMonths","longname":"differenceInMonths","name":"differenceInMonths","kind":"member","scope":"global","description":"Get the number of full months between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full months are between 31 January 2014 and 1 September 2014?\nvar result = differenceInMonths(\n new Date(2014, 0, 31),\n new Date(2014, 8, 1)\n)\n//=> 7"],"returns":[{"type":{"names":["Number"]},"description":"the number of full months"}],"category":"Month Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_months"},"summary":"Get the number of full months between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfMonth","category":"Month Helpers","title":"endOfMonth","description":"Return the end of a month for the given date.","content":{"id":"endOfMonth","longname":"endOfMonth","name":"endOfMonth","kind":"member","scope":"global","description":"Return the end of a month for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a month for 2 September 2014 11:55:00:\nvar result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_month"},"summary":"Return the end of a month for the given date.","order":0}},{"type":"jsdoc","urlId":"getDaysInMonth","category":"Month Helpers","title":"getDaysInMonth","description":"Get the number of days in a month of the given date.","content":{"id":"getDaysInMonth","longname":"getDaysInMonth","name":"getDaysInMonth","kind":"member","scope":"global","description":"Get the number of days in a month of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many days are in February 2000?\nvar result = getDaysInMonth(new Date(2000, 1))\n//=> 29"],"returns":[{"type":{"names":["Number"]},"description":"the number of days in a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_days_in_month"},"summary":"Get the number of days in a month of the given date.","order":0}},{"type":"jsdoc","urlId":"getMonth","category":"Month Helpers","title":"getMonth","description":"Get the month of the given date.","content":{"id":"getMonth","longname":"getMonth","name":"getMonth","kind":"member","scope":"global","description":"Get the month of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which month is 29 February 2012?\nvar result = getMonth(new Date(2012, 1, 29))\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"the month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_month"},"summary":"Get the month of the given date.","order":0}},{"type":"jsdoc","urlId":"isFirstDayOfMonth","category":"Month Helpers","title":"isFirstDayOfMonth","description":"Is the given date the first day of a month?","content":{"id":"isFirstDayOfMonth","longname":"isFirstDayOfMonth","name":"isFirstDayOfMonth","kind":"member","scope":"global","description":"Is the given date the first day of a month?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 1 September 2014 the first day of a month?\nvar result = isFirstDayOfMonth(new Date(2014, 8, 1))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is the first day of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_first_day_of_month"},"summary":"Is the given date the first day of a month?","order":0}},{"type":"jsdoc","urlId":"isLastDayOfMonth","category":"Month Helpers","title":"isLastDayOfMonth","description":"Is the given date the last day of a month?","content":{"id":"isLastDayOfMonth","longname":"isLastDayOfMonth","name":"isLastDayOfMonth","kind":"member","scope":"global","description":"Is the given date the last day of a month?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 28 February 2014 the last day of a month?\nvar result = isLastDayOfMonth(new Date(2014, 1, 28))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is the last day of a month"}],"category":"Month Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_last_day_of_month"},"summary":"Is the given date the last day of a month?","order":0}},{"type":"jsdoc","urlId":"isSameMonth","category":"Month Helpers","title":"isSameMonth","description":"Are the given dates in the same month?","content":{"id":"isSameMonth","longname":"isSameMonth","name":"isSameMonth","kind":"member","scope":"global","description":"Are the given dates in the same month?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 2 September 2014 and 25 September 2014 in the same month?\nvar result = isSameMonth(\n new Date(2014, 8, 2),\n new Date(2014, 8, 25)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_month"},"summary":"Are the given dates in the same month?","order":0}},{"type":"jsdoc","urlId":"lastDayOfMonth","category":"Month Helpers","title":"lastDayOfMonth","description":"Return the last day of a month for the given date.","content":{"id":"lastDayOfMonth","longname":"lastDayOfMonth","name":"lastDayOfMonth","kind":"member","scope":"global","description":"Return the last day of a month for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of a month for 2 September 2014 11:55:00:\nvar result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_month"},"summary":"Return the last day of a month for the given date.","order":0}},{"type":"jsdoc","urlId":"setMonth","category":"Month Helpers","title":"setMonth","description":"Set the month to the given date.","content":{"id":"setMonth","longname":"setMonth","name":"setMonth","kind":"member","scope":"global","description":"Set the month to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the month of the new date","name":"month"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set February to 1 September 2014:\nvar result = setMonth(new Date(2014, 8, 1), 1)\n//=> Sat Feb 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the month setted"}],"category":"Month Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_month"},"summary":"Set the month to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfMonth","category":"Month Helpers","title":"startOfMonth","description":"Return the start of a month for the given date.","content":{"id":"startOfMonth","longname":"startOfMonth","name":"startOfMonth","kind":"member","scope":"global","description":"Return the start of a month for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a month for 2 September 2014 11:55:00:\nvar result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a month"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_month"},"summary":"Return the start of a month for the given date.","order":0}},{"type":"jsdoc","urlId":"subMonths","category":"Month Helpers","title":"subMonths","description":"Subtract the specified number of months from the given date.","content":{"id":"subMonths","longname":"subMonths","name":"subMonths","kind":"member","scope":"global","description":"Subtract the specified number of months from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of months to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 5 months from 1 February 2015:\nvar result = subMonths(new Date(2015, 1, 1), 5)\n//=> Mon Sep 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the months subtracted"}],"category":"Month Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_months"},"summary":"Subtract the specified number of months from the given date.","order":0}}],"Quarter Helpers":[{"type":"jsdoc","urlId":"addQuarters","category":"Quarter Helpers","title":"addQuarters","description":"Add the specified number of year quarters to the given date.","content":{"id":"addQuarters","longname":"addQuarters","name":"addQuarters","kind":"member","scope":"global","description":"Add the specified number of year quarters to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of quarters to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 1 quarter to 1 September 2014:\nvar result = addQuarters(new Date(2014, 8, 1), 1)\n//=> Mon Dec 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the quarters added"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_quarters"},"summary":"Add the specified number of year quarters to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarQuarters","category":"Quarter Helpers","title":"differenceInCalendarQuarters","description":"Get the number of calendar quarters between the given dates.","content":{"id":"differenceInCalendarQuarters","longname":"differenceInCalendarQuarters","name":"differenceInCalendarQuarters","kind":"member","scope":"global","description":"Get the number of calendar quarters between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar quarters are between 31 December 2013 and 2 July 2014?\nvar result = differenceInCalendarQuarters(\n new Date(2013, 11, 31),\n new Date(2014, 6, 2)\n)\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar quarters"}],"category":"Quarter Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_quarters"},"summary":"Get the number of calendar quarters between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInQuarters","category":"Quarter Helpers","title":"differenceInQuarters","description":"Get the number of full quarters between the given dates.","content":{"id":"differenceInQuarters","longname":"differenceInQuarters","name":"differenceInQuarters","kind":"member","scope":"global","description":"Get the number of full quarters between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full quarters are between 31 December 2013 and 2 July 2014?\nvar result = differenceInQuarters(\n new Date(2013, 11, 31),\n new Date(2014, 6, 2)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of full quarters"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_quarters"},"summary":"Get the number of full quarters between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfQuarter","category":"Quarter Helpers","title":"endOfQuarter","description":"Return the end of a year quarter for the given date.","content":{"id":"endOfQuarter","longname":"endOfQuarter","name":"endOfQuarter","kind":"member","scope":"global","description":"Return the end of a year quarter for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a quarter for 2 September 2014 11:55:00:\nvar result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_quarter"},"summary":"Return the end of a year quarter for the given date.","order":0}},{"type":"jsdoc","urlId":"getQuarter","category":"Quarter Helpers","title":"getQuarter","description":"Get the year quarter of the given date.","content":{"id":"getQuarter","longname":"getQuarter","name":"getQuarter","kind":"member","scope":"global","description":"Get the year quarter of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which quarter is 2 July 2014?\nvar result = getQuarter(new Date(2014, 6, 2))\n//=> 3"],"returns":[{"type":{"names":["Number"]},"description":"the quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_quarter"},"summary":"Get the year quarter of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameQuarter","category":"Quarter Helpers","title":"isSameQuarter","description":"Are the given dates in the same year quarter?","content":{"id":"isSameQuarter","longname":"isSameQuarter","name":"isSameQuarter","kind":"member","scope":"global","description":"Are the given dates in the same year quarter?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 1 January 2014 and 8 March 2014 in the same quarter?\nvar result = isSameQuarter(\n new Date(2014, 0, 1),\n new Date(2014, 2, 8)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_quarter"},"summary":"Are the given dates in the same year quarter?","order":0}},{"type":"jsdoc","urlId":"lastDayOfQuarter","category":"Quarter Helpers","title":"lastDayOfQuarter","description":"Return the last day of a year quarter for the given date.","content":{"id":"lastDayOfQuarter","longname":"lastDayOfQuarter","name":"lastDayOfQuarter","kind":"member","scope":"global","description":"Return the last day of a year quarter for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of a quarter for 2 September 2014 11:55:00:\nvar result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Sep 30 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_quarter"},"summary":"Return the last day of a year quarter for the given date.","order":0}},{"type":"jsdoc","urlId":"setQuarter","category":"Quarter Helpers","title":"setQuarter","description":"Set the year quarter to the given date.","content":{"id":"setQuarter","longname":"setQuarter","name":"setQuarter","kind":"member","scope":"global","description":"Set the year quarter to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the quarter of the new date","name":"quarter"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set the 2nd quarter to 2 July 2014:\nvar result = setQuarter(new Date(2014, 6, 2), 2)\n//=> Wed Apr 02 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the quarter setted"}],"category":"Quarter Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_quarter"},"summary":"Set the year quarter to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfQuarter","category":"Quarter Helpers","title":"startOfQuarter","description":"Return the start of a year quarter for the given date.","content":{"id":"startOfQuarter","longname":"startOfQuarter","name":"startOfQuarter","kind":"member","scope":"global","description":"Return the start of a year quarter for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a quarter for 2 September 2014 11:55:00:\nvar result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n//=> Tue Jul 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a quarter"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_quarter"},"summary":"Return the start of a year quarter for the given date.","order":0}},{"type":"jsdoc","urlId":"subQuarters","category":"Quarter Helpers","title":"subQuarters","description":"Subtract the specified number of year quarters from the given date.","content":{"id":"subQuarters","longname":"subQuarters","name":"subQuarters","kind":"member","scope":"global","description":"Subtract the specified number of year quarters from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of quarters to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 3 quarters from 1 September 2014:\nvar result = subQuarters(new Date(2014, 8, 1), 3)\n//=> Sun Dec 01 2013 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the quarters subtracted"}],"category":"Quarter Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_quarters"},"summary":"Subtract the specified number of year quarters from the given date.","order":0}}],"Year Helpers":[{"type":"jsdoc","urlId":"addYears","category":"Year Helpers","title":"addYears","description":"Add the specified number of years to the given date.","content":{"id":"addYears","longname":"addYears","name":"addYears","kind":"member","scope":"global","description":"Add the specified number of years to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of years to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 5 years to 1 September 2014:\nvar result = addYears(new Date(2014, 8, 1), 5)\n//=> Sun Sep 01 2019 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the years added"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_years"},"summary":"Add the specified number of years to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarYears","category":"Year Helpers","title":"differenceInCalendarYears","description":"Get the number of calendar years between the given dates.","content":{"id":"differenceInCalendarYears","longname":"differenceInCalendarYears","name":"differenceInCalendarYears","kind":"member","scope":"global","description":"Get the number of calendar years between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar years are between 31 December 2013 and 11 February 2015?\nvar result = differenceInCalendarYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar years"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_years"},"summary":"Get the number of calendar years between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInYears","category":"Year Helpers","title":"differenceInYears","description":"Get the number of full years between the given dates.","content":{"id":"differenceInYears","longname":"differenceInYears","name":"differenceInYears","kind":"member","scope":"global","description":"Get the number of full years between the given dates.","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full years are between 31 December 2013 and 11 February 2015?\nvar result = differenceInYears(\n new Date(2013, 11, 31),\n new Date(2015, 1, 11)\n)\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"the number of full years"}],"category":"Year Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_years"},"summary":"Get the number of full years between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfYear","category":"Year Helpers","title":"endOfYear","description":"Return the end of a year for the given date.","content":{"id":"endOfYear","longname":"endOfYear","name":"endOfYear","kind":"member","scope":"global","description":"Return the end of a year for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of a year for 2 September 2014 11:55:00:\nvar result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n//=> Wed Dec 31 2014 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_year"},"summary":"Return the end of a year for the given date.","order":0}},{"type":"jsdoc","urlId":"getDaysInYear","category":"Year Helpers","title":"getDaysInYear","description":"Get the number of days in a year of the given date.","content":{"id":"getDaysInYear","longname":"getDaysInYear","name":"getDaysInYear","kind":"member","scope":"global","description":"Get the number of days in a year of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many days are in 2012?\nvar result = getDaysInYear(new Date(2012, 0, 1))\n//=> 366"],"returns":[{"type":{"names":["Number"]},"description":"the number of days in a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_days_in_year"},"summary":"Get the number of days in a year of the given date.","order":0}},{"type":"jsdoc","urlId":"getYear","category":"Year Helpers","title":"getYear","description":"Get the year of the given date.","content":{"id":"getYear","longname":"getYear","name":"getYear","kind":"member","scope":"global","description":"Get the year of the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which year is 2 July 2014?\nvar result = getYear(new Date(2014, 6, 2))\n//=> 2014"],"returns":[{"type":{"names":["Number"]},"description":"the year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_year"},"summary":"Get the year of the given date.","order":0}},{"type":"jsdoc","urlId":"isLeapYear","category":"Year Helpers","title":"isLeapYear","description":"Is the given date in the leap year?","content":{"id":"isLeapYear","longname":"isLeapYear","name":"isLeapYear","kind":"member","scope":"global","description":"Is the given date in the leap year?","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to check","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Is 1 September 2012 in the leap year?\nvar result = isLeapYear(new Date(2012, 8, 1))\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the date is in the leap year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_leap_year"},"summary":"Is the given date in the leap year?","order":0}},{"type":"jsdoc","urlId":"isSameYear","category":"Year Helpers","title":"isSameYear","description":"Are the given dates in the same year?","content":{"id":"isSameYear","longname":"isSameYear","name":"isSameYear","kind":"member","scope":"global","description":"Are the given dates in the same year?","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 2 September 2014 and 25 September 2014 in the same year?\nvar result = isSameYear(\n new Date(2014, 8, 2),\n new Date(2014, 8, 25)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_year"},"summary":"Are the given dates in the same year?","order":0}},{"type":"jsdoc","urlId":"lastDayOfYear","category":"Year Helpers","title":"lastDayOfYear","description":"Return the last day of a year for the given date.","content":{"id":"lastDayOfYear","longname":"lastDayOfYear","name":"lastDayOfYear","kind":"member","scope":"global","description":"Return the last day of a year for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of a year for 2 September 2014 11:55:00:\nvar result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00))\n//=> Wed Dec 31 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the last day of a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_year"},"summary":"Return the last day of a year for the given date.","order":0}},{"type":"jsdoc","urlId":"setYear","category":"Year Helpers","title":"setYear","description":"Set the year to the given date.","content":{"id":"setYear","longname":"setYear","name":"setYear","kind":"member","scope":"global","description":"Set the year to the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the year of the new date","name":"year"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set year 2013 to 1 September 2014:\nvar result = setYear(new Date(2014, 8, 1), 2013)\n//=> Sun Sep 01 2013 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the year setted"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_year"},"summary":"Set the year to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfYear","category":"Year Helpers","title":"startOfYear","description":"Return the start of a year for the given date.","content":{"id":"startOfYear","longname":"startOfYear","name":"startOfYear","kind":"member","scope":"global","description":"Return the start of a year for the given date.\nThe result will be in the local timezone.","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of a year for 2 September 2014 11:55:00:\nvar result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n//=> Wed Jan 01 2014 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of a year"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_year"},"summary":"Return the start of a year for the given date.","order":0}},{"type":"jsdoc","urlId":"subYears","category":"Year Helpers","title":"subYears","description":"Subtract the specified number of years from the given date.","content":{"id":"subYears","longname":"subYears","name":"subYears","kind":"member","scope":"global","description":"Subtract the specified number of years from the given date.","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of years to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 5 years from 1 September 2014:\nvar result = subYears(new Date(2014, 8, 1), 5)\n//=> Tue Sep 01 2009 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the years subtracted"}],"category":"Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_years"},"summary":"Subtract the specified number of years from the given date.","order":0}}],"ISO Week-Numbering Year Helpers":[{"type":"jsdoc","urlId":"addISOYears","category":"ISO Week-Numbering Year Helpers","title":"addISOYears","description":"Add the specified number of ISO week-numbering years to the given date.","content":{"id":"addISOYears","longname":"addISOYears","name":"addISOYears","kind":"member","scope":"global","description":"Add the specified number of ISO week-numbering years to the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of ISO week-numbering years to be added","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Add 5 ISO week-numbering years to 2 July 2010:\nvar result = addISOYears(new Date(2010, 6, 2), 5)\n//=> Fri Jun 26 2015 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week-numbering years added"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/add_iso_years"},"summary":"Add the specified number of ISO week-numbering years to the given date.","order":0}},{"type":"jsdoc","urlId":"differenceInCalendarISOYears","category":"ISO Week-Numbering Year Helpers","title":"differenceInCalendarISOYears","description":"Get the number of calendar ISO week-numbering years between the given dates.","content":{"id":"differenceInCalendarISOYears","longname":"differenceInCalendarISOYears","name":"differenceInCalendarISOYears","kind":"member","scope":"global","description":"Get the number of calendar ISO week-numbering years between the given dates.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?\nvar result = differenceInCalendarISOYears(\n new Date(2010, 0, 1),\n new Date(2012, 0, 1)\n)\n//=> 2"],"returns":[{"type":{"names":["Number"]},"description":"the number of calendar ISO week-numbering years"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_calendar_iso_years"},"summary":"Get the number of calendar ISO week-numbering years between the given dates.","order":0}},{"type":"jsdoc","urlId":"differenceInISOYears","category":"ISO Week-Numbering Year Helpers","title":"differenceInISOYears","description":"Get the number of full ISO week-numbering years between the given dates.","content":{"id":"differenceInISOYears","longname":"differenceInISOYears","name":"differenceInISOYears","kind":"member","scope":"global","description":"Get the number of full ISO week-numbering years between the given dates.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the earlier date","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the later date","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?\nvar result = differenceInISOYears(\n new Date(2010, 0, 1),\n new Date(2012, 0, 1)\n)\n//=> 1"],"returns":[{"type":{"names":["Number"]},"description":"the number of full ISO week-numbering years"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/difference_in_iso_years"},"summary":"Get the number of full ISO week-numbering years between the given dates.","order":0}},{"type":"jsdoc","urlId":"endOfISOYear","category":"ISO Week-Numbering Year Helpers","title":"endOfISOYear","description":"Return the end of an ISO week-numbering year for the given date.","content":{"id":"endOfISOYear","longname":"endOfISOYear","name":"endOfISOYear","kind":"member","scope":"global","description":"Return the end of an ISO week-numbering year,\nwhich always starts 3 days before the year's first Thursday.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The end of an ISO week-numbering year for 2 July 2005:\nvar result = endOfISOYear(new Date(2005, 6, 2))\n//=> Sun Jan 01 2006 23:59:59.999"],"returns":[{"type":{"names":["Date"]},"description":"the end of an ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/end_of_iso_year"},"summary":"Return the end of an ISO week-numbering year for the given date.","order":0}},{"type":"jsdoc","urlId":"getISOWeeksInYear","category":"ISO Week-Numbering Year Helpers","title":"getISOWeeksInYear","description":"Get the number of weeks in an ISO week-numbering year of the given date.","content":{"id":"getISOWeeksInYear","longname":"getISOWeeksInYear","name":"getISOWeeksInYear","kind":"member","scope":"global","description":"Get the number of weeks in an ISO week-numbering year of the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// How many weeks are in ISO week-numbering year 2015?\nvar result = getISOWeeksInYear(new Date(2015, 1, 11))\n//=> 53"],"returns":[{"type":{"names":["Number"]},"description":"the number of ISO weeks in a year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":6,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_weeks_in_year"},"summary":"Get the number of weeks in an ISO week-numbering year of the given date.","order":0}},{"type":"jsdoc","urlId":"getISOYear","category":"ISO Week-Numbering Year Helpers","title":"getISOYear","description":"Get the ISO week-numbering year of the given date.","content":{"id":"getISOYear","longname":"getISOYear","name":"getISOYear","kind":"member","scope":"global","description":"Get the ISO week-numbering year of the given date,\nwhich always starts 3 days before the year's first Thursday.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the given date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Which ISO-week numbering year is 2 January 2005?\nvar result = getISOYear(new Date(2005, 0, 2))\n//=> 2004"],"returns":[{"type":{"names":["Number"]},"description":"the ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/get_iso_year"},"summary":"Get the ISO week-numbering year of the given date.","order":0}},{"type":"jsdoc","urlId":"isSameISOYear","category":"ISO Week-Numbering Year Helpers","title":"isSameISOYear","description":"Are the given dates in the same ISO week-numbering year?","content":{"id":"isSameISOYear","longname":"isSameISOYear","name":"isSameISOYear","kind":"member","scope":"global","description":"Are the given dates in the same ISO week-numbering year?\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the first date to check","name":"dateLeft"},{"type":{"names":["Date","String","Number"]},"description":"the second date to check","name":"dateRight"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?\nvar result = isSameISOYear(\n new Date(2003, 11, 29),\n new Date(2005, 0, 2)\n)\n//=> true"],"returns":[{"type":{"names":["Boolean"]},"description":"the dates are in the same ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/is_same_iso_year"},"summary":"Are the given dates in the same ISO week-numbering year?","order":0}},{"type":"jsdoc","urlId":"lastDayOfISOYear","category":"ISO Week-Numbering Year Helpers","title":"lastDayOfISOYear","description":"Return the last day of an ISO week-numbering year for the given date.","content":{"id":"lastDayOfISOYear","longname":"lastDayOfISOYear","name":"lastDayOfISOYear","kind":"member","scope":"global","description":"Return the last day of an ISO week-numbering year,\nwhich always starts 3 days before the year's first Thursday.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The last day of an ISO week-numbering year for 2 July 2005:\nvar result = lastDayOfISOYear(new Date(2005, 6, 2))\n//=> Sun Jan 01 2006 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the end of an ISO week-numbering year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/last_day_of_iso_year"},"summary":"Return the last day of an ISO week-numbering year for the given date.","order":0}},{"type":"jsdoc","urlId":"setISOYear","category":"ISO Week-Numbering Year Helpers","title":"setISOYear","description":"Set the ISO week-numbering year to the given date.","content":{"id":"setISOYear","longname":"setISOYear","name":"setISOYear","kind":"member","scope":"global","description":"Set the ISO week-numbering year to the given date,\nsaving the week number and the weekday number.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the ISO week-numbering year of the new date","name":"isoYear"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Set ISO week-numbering year 2007 to 29 December 2008:\nvar result = setISOYear(new Date(2008, 11, 29), 2007)\n//=> Mon Jan 01 2007 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week-numbering year setted"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":5,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/set_iso_year"},"summary":"Set the ISO week-numbering year to the given date.","order":0}},{"type":"jsdoc","urlId":"startOfISOYear","category":"ISO Week-Numbering Year Helpers","title":"startOfISOYear","description":"Return the start of an ISO week-numbering year for the given date.","content":{"id":"startOfISOYear","longname":"startOfISOYear","name":"startOfISOYear","kind":"member","scope":"global","description":"Return the start of an ISO week-numbering year,\nwhich always starts 3 days before the year's first Thursday.\nThe result will be in the local timezone.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the original date","name":"date"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// The start of an ISO week-numbering year for 2 July 2005:\nvar result = startOfISOYear(new Date(2005, 6, 2))\n//=> Mon Jan 03 2005 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the start of an ISO year"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":4,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/start_of_iso_year"},"summary":"Return the start of an ISO week-numbering year for the given date.","order":0}},{"type":"jsdoc","urlId":"subISOYears","category":"ISO Week-Numbering Year Helpers","title":"subISOYears","description":"Subtract the specified number of ISO week-numbering years from the given date.","content":{"id":"subISOYears","longname":"subISOYears","name":"subISOYears","kind":"member","scope":"global","description":"Subtract the specified number of ISO week-numbering years from the given date.\n\nISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date","params":[{"type":{"names":["Date","String","Number"]},"description":"the date to be changed","name":"date"},{"type":{"names":["Number"]},"description":"the amount of ISO week-numbering years to be subtracted","name":"amount"},{"type":{"names":["Options"]},"optional":true,"description":"the object with options. See [Options]{@link docs/Options}","name":"options"}],"examples":["// Subtract 5 ISO week-numbering years from 1 September 2014:\nvar result = subISOYears(new Date(2014, 8, 1), 5)\n//=> Mon Aug 31 2009 00:00:00"],"returns":[{"type":{"names":["Date"]},"description":"the new date with the ISO week-numbering years subtracted"}],"category":"ISO Week-Numbering Year Helpers","meta":{"lineno":3,"filename":"index.js","path":"/Users/lesha/Work/date-fns/src/sub_iso_years"},"summary":"Subtract the specified number of ISO week-numbering years from the given date.","order":0}}]} \ No newline at end of file diff --git a/docs/Options.js b/docs/Options.js index e2bec9c90b..cae5a1a15b 100644 --- a/docs/Options.js +++ b/docs/Options.js @@ -16,6 +16,10 @@ * @property {Locale} [locale=enLocale] - the locale object. * Used by `distanceInWords`, `distanceInWordsStrict`, `format` and `parse`. * See [Locale]{@link docs/Locale} + * @property {Boolean} [includeSeconds=false] - used by `distanceInWords`. + * If true, distances less than a minute are more detailed + * @property {Boolean} [addSuffix=false] - used by `distanceInWords` and `distanceInWordsStrinct`. + * If true, the result will indicate if the second date is earlier or later than the first * @property {'s'|'m'|'h'|'d'|'M'|'Y'} [unit] - used by `distanceInWordsStrict`. * If specified, will force a unit * @property {'floor'|'ceil'|'round'} [partialMethod='floor'] - used by `distanceInWordsStrict`. diff --git a/src/addDays/index.js.flow b/src/addDays/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addDays/index.js.flow +++ b/src/addDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addHours/index.js.flow b/src/addHours/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addHours/index.js.flow +++ b/src/addHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addISOYears/index.js.flow b/src/addISOYears/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addISOYears/index.js.flow +++ b/src/addISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addMilliseconds/index.js.flow b/src/addMilliseconds/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addMilliseconds/index.js.flow +++ b/src/addMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addMinutes/index.js.flow b/src/addMinutes/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addMinutes/index.js.flow +++ b/src/addMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addMonths/index.js.flow b/src/addMonths/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addMonths/index.js.flow +++ b/src/addMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addQuarters/index.js.flow b/src/addQuarters/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addQuarters/index.js.flow +++ b/src/addQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addSeconds/index.js.flow b/src/addSeconds/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addSeconds/index.js.flow +++ b/src/addSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addWeeks/index.js.flow b/src/addWeeks/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addWeeks/index.js.flow +++ b/src/addWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/addYears/index.js.flow b/src/addYears/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/addYears/index.js.flow +++ b/src/addYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/areIntervalsOverlapping/index.js b/src/areIntervalsOverlapping/index.js index 065728269f..8ba1f3731b 100644 --- a/src/areIntervalsOverlapping/index.js +++ b/src/areIntervalsOverlapping/index.js @@ -30,11 +30,11 @@ import toDate from '../toDate/index.js' * ) * //=> false */ -export default function areIntervalsOverlapping (dirtyIntervalLeft, dirtyIntervalRight, options) { - var leftStartTime = toDate(dirtyIntervalLeft.start, options).getTime() - var leftEndTime = toDate(dirtyIntervalLeft.end, options).getTime() - var rightStartTime = toDate(dirtyIntervalRight.start, options).getTime() - var rightEndTime = toDate(dirtyIntervalRight.end, options).getTime() +export default function areIntervalsOverlapping (dirtyIntervalLeft, dirtyIntervalRight, dirtyOptions) { + var leftStartTime = toDate(dirtyIntervalLeft.start, dirtyOptions).getTime() + var leftEndTime = toDate(dirtyIntervalLeft.end, dirtyOptions).getTime() + var rightStartTime = toDate(dirtyIntervalRight.start, dirtyOptions).getTime() + var rightEndTime = toDate(dirtyIntervalRight.end, dirtyOptions).getTime() if (leftStartTime > leftEndTime || rightStartTime > rightEndTime) { throw new Error('The start of an interval cannot be after its end') diff --git a/src/areIntervalsOverlapping/index.js.flow b/src/areIntervalsOverlapping/index.js.flow index afa550815b..a9d71bbd6e 100644 --- a/src/areIntervalsOverlapping/index.js.flow +++ b/src/areIntervalsOverlapping/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/closestIndexTo/index.js b/src/closestIndexTo/index.js index c306fe039e..27a9651bad 100644 --- a/src/closestIndexTo/index.js +++ b/src/closestIndexTo/index.js @@ -24,15 +24,15 @@ import toDate from '../toDate/index.js' * var result = closestIndexTo(dateToCompare, datesArray) * //=> 1 */ -export default function closestIndexTo (dirtyDateToCompare, dirtyDatesArray, options) { - var dateToCompare = toDate(dirtyDateToCompare, options) +export default function closestIndexTo (dirtyDateToCompare, dirtyDatesArray, dirtyOptions) { + var dateToCompare = toDate(dirtyDateToCompare, dirtyOptions) var timeToCompare = dateToCompare.getTime() var result var minDistance dirtyDatesArray.forEach(function (dirtyDate, index) { - var currentDate = toDate(dirtyDate, options) + var currentDate = toDate(dirtyDate, dirtyOptions) var distance = Math.abs(timeToCompare - currentDate.getTime()) if (result === undefined || distance < minDistance) { result = index diff --git a/src/closestIndexTo/index.js.flow b/src/closestIndexTo/index.js.flow index ff2240a9f2..bce07e6ba3 100644 --- a/src/closestIndexTo/index.js.flow +++ b/src/closestIndexTo/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/closestTo/index.js b/src/closestTo/index.js index 5fa6d4da2d..16718e7b11 100644 --- a/src/closestTo/index.js +++ b/src/closestTo/index.js @@ -22,15 +22,15 @@ import toDate from '../toDate/index.js' * ]) * //=> Tue Jan 01 2030 00:00:00 */ -export default function closestTo (dirtyDateToCompare, dirtyDatesArray, options) { - var dateToCompare = toDate(dirtyDateToCompare, options) +export default function closestTo (dirtyDateToCompare, dirtyDatesArray, dirtyOptions) { + var dateToCompare = toDate(dirtyDateToCompare, dirtyOptions) var timeToCompare = dateToCompare.getTime() var result var minDistance dirtyDatesArray.forEach(function (dirtyDate) { - var currentDate = toDate(dirtyDate, options) + var currentDate = toDate(dirtyDate, dirtyOptions) var distance = Math.abs(timeToCompare - currentDate.getTime()) if (result === undefined || distance < minDistance) { result = currentDate diff --git a/src/closestTo/index.js.flow b/src/closestTo/index.js.flow index e6ec9b9652..4fae04feac 100644 --- a/src/closestTo/index.js.flow +++ b/src/closestTo/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/compareAsc/index.js b/src/compareAsc/index.js index 29c73353a6..6bc4ee8ab8 100644 --- a/src/compareAsc/index.js +++ b/src/compareAsc/index.js @@ -35,10 +35,10 @@ import toDate from '../toDate/index.js' * // Sun Jul 02 1995 00:00:00 * // ] */ -export default function compareAsc (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) +export default function compareAsc (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) var timeLeft = dateLeft.getTime() - var dateRight = toDate(dirtyDateRight, options) + var dateRight = toDate(dirtyDateRight, dirtyOptions) var timeRight = dateRight.getTime() if (timeLeft < timeRight) { diff --git a/src/compareAsc/index.js.flow b/src/compareAsc/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/compareAsc/index.js.flow +++ b/src/compareAsc/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/compareDesc/index.js b/src/compareDesc/index.js index afb9a9a7f6..8a6d62b324 100644 --- a/src/compareDesc/index.js +++ b/src/compareDesc/index.js @@ -35,10 +35,10 @@ import toDate from '../toDate/index.js' * // Wed Feb 11 1987 00:00:00 * // ] */ -export default function compareDesc (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) +export default function compareDesc (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) var timeLeft = dateLeft.getTime() - var dateRight = toDate(dirtyDateRight, options) + var dateRight = toDate(dirtyDateRight, dirtyOptions) var timeRight = dateRight.getTime() if (timeLeft > timeRight) { diff --git a/src/compareDesc/index.js.flow b/src/compareDesc/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/compareDesc/index.js.flow +++ b/src/compareDesc/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarDays/index.js b/src/differenceInCalendarDays/index.js index 0f00e452a5..da530ba239 100644 --- a/src/differenceInCalendarDays/index.js +++ b/src/differenceInCalendarDays/index.js @@ -25,9 +25,9 @@ var MILLISECONDS_IN_DAY = 86400000 * ) * //=> 366 */ -export default function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight, options) { - var startOfDayLeft = startOfDay(dirtyDateLeft, options) - var startOfDayRight = startOfDay(dirtyDateRight, options) +export default function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var startOfDayLeft = startOfDay(dirtyDateLeft, dirtyOptions) + var startOfDayRight = startOfDay(dirtyDateRight, dirtyOptions) var timestampLeft = startOfDayLeft.getTime() - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE diff --git a/src/differenceInCalendarDays/index.js.flow b/src/differenceInCalendarDays/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarDays/index.js.flow +++ b/src/differenceInCalendarDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarISOWeeks/index.js b/src/differenceInCalendarISOWeeks/index.js index db46b8eb76..9bffca2d48 100644 --- a/src/differenceInCalendarISOWeeks/index.js +++ b/src/differenceInCalendarISOWeeks/index.js @@ -26,9 +26,9 @@ var MILLISECONDS_IN_WEEK = 604800000 * ) * //=> 3 */ -export default function differenceInCalendarISOWeeks (dirtyDateLeft, dirtyDateRight, options) { - var startOfISOWeekLeft = startOfISOWeek(dirtyDateLeft, options) - var startOfISOWeekRight = startOfISOWeek(dirtyDateRight, options) +export default function differenceInCalendarISOWeeks (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var startOfISOWeekLeft = startOfISOWeek(dirtyDateLeft, dirtyOptions) + var startOfISOWeekRight = startOfISOWeek(dirtyDateRight, dirtyOptions) var timestampLeft = startOfISOWeekLeft.getTime() - startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE diff --git a/src/differenceInCalendarISOWeeks/index.js.flow b/src/differenceInCalendarISOWeeks/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarISOWeeks/index.js.flow +++ b/src/differenceInCalendarISOWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarISOYears/index.js b/src/differenceInCalendarISOYears/index.js index 1ea2c629aa..a77eead492 100644 --- a/src/differenceInCalendarISOYears/index.js +++ b/src/differenceInCalendarISOYears/index.js @@ -23,6 +23,6 @@ import getISOYear from '../getISOYear/index.js' * ) * //=> 2 */ -export default function differenceInCalendarISOYears (dirtyDateLeft, dirtyDateRight, options) { - return getISOYear(dirtyDateRight, options) - getISOYear(dirtyDateLeft, options) +export default function differenceInCalendarISOYears (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + return getISOYear(dirtyDateRight, dirtyOptions) - getISOYear(dirtyDateLeft, dirtyOptions) } diff --git a/src/differenceInCalendarISOYears/index.js.flow b/src/differenceInCalendarISOYears/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarISOYears/index.js.flow +++ b/src/differenceInCalendarISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarMonths/index.js b/src/differenceInCalendarMonths/index.js index ccd86d9b14..e0f0201938 100644 --- a/src/differenceInCalendarMonths/index.js +++ b/src/differenceInCalendarMonths/index.js @@ -21,9 +21,9 @@ import toDate from '../toDate/index.js' * ) * //=> 8 */ -export default function differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) var yearDiff = dateRight.getFullYear() - dateLeft.getFullYear() var monthDiff = dateRight.getMonth() - dateLeft.getMonth() diff --git a/src/differenceInCalendarMonths/index.js.flow b/src/differenceInCalendarMonths/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarMonths/index.js.flow +++ b/src/differenceInCalendarMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarQuarters/index.js b/src/differenceInCalendarQuarters/index.js index 53aab6498f..4e21704cee 100644 --- a/src/differenceInCalendarQuarters/index.js +++ b/src/differenceInCalendarQuarters/index.js @@ -22,12 +22,12 @@ import toDate from '../toDate/index.js' * ) * //=> 3 */ -export default function differenceInCalendarQuarters (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInCalendarQuarters (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) var yearDiff = dateRight.getFullYear() - dateLeft.getFullYear() - var quarterDiff = getQuarter(dateRight, options) - getQuarter(dateLeft, options) + var quarterDiff = getQuarter(dateRight, dirtyOptions) - getQuarter(dateLeft, dirtyOptions) return yearDiff * 4 + quarterDiff } diff --git a/src/differenceInCalendarQuarters/index.js.flow b/src/differenceInCalendarQuarters/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarQuarters/index.js.flow +++ b/src/differenceInCalendarQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarWeeks/index.js.flow b/src/differenceInCalendarWeeks/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarWeeks/index.js.flow +++ b/src/differenceInCalendarWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInCalendarYears/index.js b/src/differenceInCalendarYears/index.js index cb033784c1..ccf90bf4c5 100644 --- a/src/differenceInCalendarYears/index.js +++ b/src/differenceInCalendarYears/index.js @@ -21,9 +21,9 @@ import toDate from '../toDate/index.js' * ) * //=> 2 */ -export default function differenceInCalendarYears (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInCalendarYears (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) return dateRight.getFullYear() - dateLeft.getFullYear() } diff --git a/src/differenceInCalendarYears/index.js.flow b/src/differenceInCalendarYears/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInCalendarYears/index.js.flow +++ b/src/differenceInCalendarYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInDays/index.js b/src/differenceInDays/index.js index 2dfac0bc16..aef7ef180c 100644 --- a/src/differenceInDays/index.js +++ b/src/differenceInDays/index.js @@ -24,16 +24,16 @@ import compareDesc from '../compareDesc/index.js' * ) * //=> 365 */ -export default function differenceInDays (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInDays (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) - var sign = compareDesc(dateLeft, dateRight, options) - var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight, options)) + var sign = compareDesc(dateLeft, dateRight, dirtyOptions) + var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight, dirtyOptions)) // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full // If so, result must be decreased by 1 in absolute value dateRight.setDate(dateRight.getDate() - sign * difference) - var isLastDayNotFull = compareDesc(dateLeft, dateRight, options) === -sign + var isLastDayNotFull = compareDesc(dateLeft, dateRight, dirtyOptions) === -sign return sign * (difference - isLastDayNotFull) } diff --git a/src/differenceInDays/index.js.flow b/src/differenceInDays/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInDays/index.js.flow +++ b/src/differenceInDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInHours/index.js b/src/differenceInHours/index.js index 1f3ec90a10..1784951a16 100644 --- a/src/differenceInHours/index.js +++ b/src/differenceInHours/index.js @@ -23,7 +23,7 @@ var MILLISECONDS_IN_HOUR = 3600000 * ) * //=> 12 */ -export default function differenceInHours (dirtyDateLeft, dirtyDateRight, options) { - var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight, options) / MILLISECONDS_IN_HOUR +export default function differenceInHours (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight, dirtyOptions) / MILLISECONDS_IN_HOUR return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } diff --git a/src/differenceInHours/index.js.flow b/src/differenceInHours/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInHours/index.js.flow +++ b/src/differenceInHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInISOYears/index.js b/src/differenceInISOYears/index.js index 636f3634f6..e5b333264c 100644 --- a/src/differenceInISOYears/index.js +++ b/src/differenceInISOYears/index.js @@ -26,17 +26,17 @@ import subISOYears from '../subISOYears/index.js' * ) * //=> 1 */ -export default function differenceInISOYears (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInISOYears (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) - var sign = compareDesc(dateLeft, dateRight, options) - var difference = Math.abs(differenceInCalendarISOYears(dateLeft, dateRight, options)) + var sign = compareDesc(dateLeft, dateRight, dirtyOptions) + var difference = Math.abs(differenceInCalendarISOYears(dateLeft, dateRight, dirtyOptions)) // Math.abs(diff in full ISO years - diff in calendar ISO years) === 1 // if last calendar ISO year is not full // If so, result must be decreased by 1 in absolute value - dateRight = subISOYears(dateRight, sign * difference, options) - var isLastISOYearNotFull = compareDesc(dateLeft, dateRight, options) === -sign + dateRight = subISOYears(dateRight, sign * difference, dirtyOptions) + var isLastISOYearNotFull = compareDesc(dateLeft, dateRight, dirtyOptions) === -sign return sign * (difference - isLastISOYearNotFull) } diff --git a/src/differenceInISOYears/index.js.flow b/src/differenceInISOYears/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInISOYears/index.js.flow +++ b/src/differenceInISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInMilliseconds/index.js b/src/differenceInMilliseconds/index.js index 22be656e88..c1a9948396 100644 --- a/src/differenceInMilliseconds/index.js +++ b/src/differenceInMilliseconds/index.js @@ -22,8 +22,8 @@ import toDate from '../toDate/index.js' * ) * //=> 1100 */ -export default function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) return dateRight.getTime() - dateLeft.getTime() } diff --git a/src/differenceInMilliseconds/index.js.flow b/src/differenceInMilliseconds/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInMilliseconds/index.js.flow +++ b/src/differenceInMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInMinutes/index.js b/src/differenceInMinutes/index.js index 9437e26f79..1e50d7b8e5 100644 --- a/src/differenceInMinutes/index.js +++ b/src/differenceInMinutes/index.js @@ -23,7 +23,7 @@ var MILLISECONDS_IN_MINUTE = 60000 * ) * //=> 12 */ -export default function differenceInMinutes (dirtyDateLeft, dirtyDateRight, options) { - var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight, options) / MILLISECONDS_IN_MINUTE +export default function differenceInMinutes (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight, dirtyOptions) / MILLISECONDS_IN_MINUTE return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } diff --git a/src/differenceInMinutes/index.js.flow b/src/differenceInMinutes/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInMinutes/index.js.flow +++ b/src/differenceInMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInMonths/index.js b/src/differenceInMonths/index.js index 47023c0893..e97e2013b1 100644 --- a/src/differenceInMonths/index.js +++ b/src/differenceInMonths/index.js @@ -23,16 +23,16 @@ import compareDesc from '../compareDesc/index.js' * ) * //=> 7 */ -export default function differenceInMonths (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInMonths (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) - var sign = compareDesc(dateLeft, dateRight) - var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight, options)) + var sign = compareDesc(dateLeft, dateRight, dirtyOptions) + var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight, dirtyOptions)) // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full // If so, result must be decreased by 1 in absolute value dateRight.setMonth(dateRight.getMonth() - sign * difference) - var isLastMonthNotFull = compareDesc(dateLeft, dateRight, options) === -sign + var isLastMonthNotFull = compareDesc(dateLeft, dateRight, dirtyOptions) === -sign return sign * (difference - isLastMonthNotFull) } diff --git a/src/differenceInMonths/index.js.flow b/src/differenceInMonths/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInMonths/index.js.flow +++ b/src/differenceInMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInQuarters/index.js b/src/differenceInQuarters/index.js index a97834719e..cf42778835 100644 --- a/src/differenceInQuarters/index.js +++ b/src/differenceInQuarters/index.js @@ -21,7 +21,7 @@ import differenceInMonths from '../differenceInMonths/index.js' * ) * //=> 2 */ -export default function differenceInQuarters (dirtyDateLeft, dirtyDateRight, options) { - var diff = differenceInMonths(dirtyDateLeft, dirtyDateRight, options) / 3 +export default function differenceInQuarters (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var diff = differenceInMonths(dirtyDateLeft, dirtyDateRight, dirtyOptions) / 3 return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } diff --git a/src/differenceInQuarters/index.js.flow b/src/differenceInQuarters/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInQuarters/index.js.flow +++ b/src/differenceInQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInSeconds/index.js b/src/differenceInSeconds/index.js index 91a6367f4e..3d277c42c6 100644 --- a/src/differenceInSeconds/index.js +++ b/src/differenceInSeconds/index.js @@ -22,7 +22,7 @@ import differenceInMilliseconds from '../differenceInMilliseconds/index.js' * ) * //=> 12 */ -export default function differenceInSeconds (dirtyDateLeft, dirtyDateRight, options) { - var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight, options) / 1000 +export default function differenceInSeconds (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight, dirtyOptions) / 1000 return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } diff --git a/src/differenceInSeconds/index.js.flow b/src/differenceInSeconds/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInSeconds/index.js.flow +++ b/src/differenceInSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInWeeks/index.js b/src/differenceInWeeks/index.js index bd296245a0..fd0c30ccfd 100644 --- a/src/differenceInWeeks/index.js +++ b/src/differenceInWeeks/index.js @@ -21,7 +21,7 @@ import differenceInDays from '../differenceInDays/index.js' * ) * //=> 2 */ -export default function differenceInWeeks (dirtyDateLeft, dirtyDateRight, options) { - var diff = differenceInDays(dirtyDateLeft, dirtyDateRight, options) / 7 +export default function differenceInWeeks (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var diff = differenceInDays(dirtyDateLeft, dirtyDateRight, dirtyOptions) / 7 return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } diff --git a/src/differenceInWeeks/index.js.flow b/src/differenceInWeeks/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInWeeks/index.js.flow +++ b/src/differenceInWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/differenceInYears/index.js b/src/differenceInYears/index.js index c4cb8b0fa4..9259d7d56d 100644 --- a/src/differenceInYears/index.js +++ b/src/differenceInYears/index.js @@ -23,16 +23,16 @@ import compareDesc from '../compareDesc/index.js' * ) * //=> 1 */ -export default function differenceInYears (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function differenceInYears (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) - var sign = compareDesc(dateLeft, dateRight, options) - var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight, options)) + var sign = compareDesc(dateLeft, dateRight, dirtyOptions) + var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight, dirtyOptions)) // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full // If so, result must be decreased by 1 in absolute value dateRight.setFullYear(dateRight.getFullYear() - sign * difference) - var isLastYearNotFull = compareDesc(dateLeft, dateRight, options) === -sign + var isLastYearNotFull = compareDesc(dateLeft, dateRight, dirtyOptions) === -sign return sign * (difference - isLastYearNotFull) } diff --git a/src/differenceInYears/index.js.flow b/src/differenceInYears/index.js.flow index ed81dd7920..6b9ba97596 100644 --- a/src/differenceInYears/index.js.flow +++ b/src/differenceInYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/distanceInWords/index.js.flow b/src/distanceInWords/index.js.flow index 454bacdc19..eeb8b57a97 100644 --- a/src/distanceInWords/index.js.flow +++ b/src/distanceInWords/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/distanceInWordsStrict/index.js.flow b/src/distanceInWordsStrict/index.js.flow index 454bacdc19..eeb8b57a97 100644 --- a/src/distanceInWordsStrict/index.js.flow +++ b/src/distanceInWordsStrict/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/eachDayOfInterval/index.js b/src/eachDayOfInterval/index.js index 533794bf40..f1e5d1f5aa 100644 --- a/src/eachDayOfInterval/index.js +++ b/src/eachDayOfInterval/index.js @@ -27,9 +27,9 @@ import toDate from '../toDate/index.js' * // Fri Oct 10 2014 00:00:00 * // ] */ -export default function eachDayOfInterval (dirtyInterval, options) { - var startDate = toDate(dirtyInterval.start, options) - var endDate = toDate(dirtyInterval.end, options) +export default function eachDayOfInterval (dirtyInterval, dirtyOptions) { + var startDate = toDate(dirtyInterval.start, dirtyOptions) + var endDate = toDate(dirtyInterval.end, dirtyOptions) var endTime = endDate.getTime() @@ -43,7 +43,7 @@ export default function eachDayOfInterval (dirtyInterval, options) { currentDate.setHours(0, 0, 0, 0) while (currentDate.getTime() <= endTime) { - dates.push(toDate(currentDate, options)) + dates.push(toDate(currentDate, dirtyOptions)) currentDate.setDate(currentDate.getDate() + 1) } diff --git a/src/eachDayOfInterval/index.js.flow b/src/eachDayOfInterval/index.js.flow index 23943689e1..ca7f1f7048 100644 --- a/src/eachDayOfInterval/index.js.flow +++ b/src/eachDayOfInterval/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfDay/index.js b/src/endOfDay/index.js index 8776dd1c45..0b7e7b9524 100644 --- a/src/endOfDay/index.js +++ b/src/endOfDay/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfDay(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 02 2014 23:59:59.999 */ -export default function endOfDay (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfDay (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setHours(23, 59, 59, 999) return date } diff --git a/src/endOfDay/index.js.flow b/src/endOfDay/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfDay/index.js.flow +++ b/src/endOfDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfHour/index.js b/src/endOfHour/index.js index a9cdd66b54..364b37bd7e 100644 --- a/src/endOfHour/index.js +++ b/src/endOfHour/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfHour(new Date(2014, 8, 2, 11, 55)) * //=> Tue Sep 02 2014 11:59:59.999 */ -export default function endOfHour (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfHour (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setMinutes(59, 59, 999) return date } diff --git a/src/endOfHour/index.js.flow b/src/endOfHour/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfHour/index.js.flow +++ b/src/endOfHour/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfISOWeek/index.js b/src/endOfISOWeek/index.js index 56ba9388ae..fd4fd3d269 100644 --- a/src/endOfISOWeek/index.js +++ b/src/endOfISOWeek/index.js @@ -21,8 +21,8 @@ import cloneObject from '../_lib/cloneObject/index.js' * var result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Sun Sep 07 2014 23:59:59.999 */ -export default function endOfISOWeek (dirtyDate, options) { - var endOfWeekOptions = cloneObject(options) +export default function endOfISOWeek (dirtyDate, dirtyOptions) { + var endOfWeekOptions = cloneObject(dirtyOptions) endOfWeekOptions.weekStartsOn = 1 return endOfWeek(dirtyDate, endOfWeekOptions) } diff --git a/src/endOfISOWeek/index.js.flow b/src/endOfISOWeek/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfISOWeek/index.js.flow +++ b/src/endOfISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfISOYear/index.js b/src/endOfISOYear/index.js index 14ad8f600e..8d5aa3d2a6 100644 --- a/src/endOfISOYear/index.js +++ b/src/endOfISOYear/index.js @@ -22,12 +22,12 @@ import startOfISOWeek from '../startOfISOWeek/index.js' * var result = endOfISOYear(new Date(2005, 6, 2)) * //=> Sun Jan 01 2006 23:59:59.999 */ -export default function endOfISOYear (dirtyDate, options) { - var year = getISOYear(dirtyDate, options) +export default function endOfISOYear (dirtyDate, dirtyOptions) { + var year = getISOYear(dirtyDate, dirtyOptions) var fourthOfJanuaryOfNextYear = new Date(0) fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4) fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0) - var date = startOfISOWeek(fourthOfJanuaryOfNextYear, options) + var date = startOfISOWeek(fourthOfJanuaryOfNextYear, dirtyOptions) date.setMilliseconds(date.getMilliseconds() - 1) return date } diff --git a/src/endOfISOYear/index.js.flow b/src/endOfISOYear/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfISOYear/index.js.flow +++ b/src/endOfISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfMinute/index.js b/src/endOfMinute/index.js index 2431b82ac5..a701b9ab15 100644 --- a/src/endOfMinute/index.js +++ b/src/endOfMinute/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400)) * //=> Mon Dec 01 2014 22:15:59.999 */ -export default function endOfMinute (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfMinute (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setSeconds(59, 999) return date } diff --git a/src/endOfMinute/index.js.flow b/src/endOfMinute/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfMinute/index.js.flow +++ b/src/endOfMinute/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfMonth/index.js b/src/endOfMonth/index.js index dc09808fd8..fcc9080090 100644 --- a/src/endOfMonth/index.js +++ b/src/endOfMonth/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 30 2014 23:59:59.999 */ -export default function endOfMonth (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfMonth (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var month = date.getMonth() date.setFullYear(date.getFullYear(), month + 1, 0) date.setHours(23, 59, 59, 999) diff --git a/src/endOfMonth/index.js.flow b/src/endOfMonth/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfMonth/index.js.flow +++ b/src/endOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfQuarter/index.js b/src/endOfQuarter/index.js index 6d2f37f38d..3e179f7a74 100644 --- a/src/endOfQuarter/index.js +++ b/src/endOfQuarter/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 30 2014 23:59:59.999 */ -export default function endOfQuarter (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfQuarter (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var currentMonth = date.getMonth() var month = currentMonth - currentMonth % 3 + 3 date.setMonth(month, 0) diff --git a/src/endOfQuarter/index.js.flow b/src/endOfQuarter/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfQuarter/index.js.flow +++ b/src/endOfQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfSecond/index.js b/src/endOfSecond/index.js index 2779c2fd10..995067395d 100644 --- a/src/endOfSecond/index.js +++ b/src/endOfSecond/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400)) * //=> Mon Dec 01 2014 22:15:45.999 */ -export default function endOfSecond (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfSecond (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setMilliseconds(999) return date } diff --git a/src/endOfSecond/index.js.flow b/src/endOfSecond/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfSecond/index.js.flow +++ b/src/endOfSecond/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfWeek/index.js.flow b/src/endOfWeek/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfWeek/index.js.flow +++ b/src/endOfWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/endOfYear/index.js b/src/endOfYear/index.js index 4668671230..375e782da8 100644 --- a/src/endOfYear/index.js +++ b/src/endOfYear/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00)) * //=> Wed Dec 31 2014 23:59:59.999 */ -export default function endOfYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function endOfYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getFullYear() date.setFullYear(year + 1, 0, 0) date.setHours(23, 59, 59, 999) diff --git a/src/endOfYear/index.js.flow b/src/endOfYear/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/endOfYear/index.js.flow +++ b/src/endOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/format/_lib/addUTCMinutes/index.js b/src/format/_lib/addUTCMinutes/index.js index f17f702533..bd8e333e50 100644 --- a/src/format/_lib/addUTCMinutes/index.js +++ b/src/format/_lib/addUTCMinutes/index.js @@ -2,8 +2,9 @@ import toDate from '../../../toDate/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function addUTCMinutes (dirtyDate, amount, options) { - var date = toDate(dirtyDate, options) +export default function addUTCMinutes (dirtyDate, dirtyAmount, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var amount = Number(dirtyAmount) date.setUTCMinutes(date.getUTCMinutes() + amount) return date } diff --git a/src/format/_lib/addUTCMinutes/test.js b/src/format/_lib/addUTCMinutes/test.js index b13ec7bb63..5492a3ec61 100644 --- a/src/format/_lib/addUTCMinutes/test.js +++ b/src/format/_lib/addUTCMinutes/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import addUTCMinutes from '.' -describe('addUTCMinutes', function () { +describe('format > addUTCMinutes', function () { it('adds the given number of minutes', function () { var result = addUTCMinutes(new Date(Date.UTC(2014, 6 /* Jul */, 10, 12, 0)), 30) assert.deepEqual(result, new Date(Date.UTC(2014, 6 /* Jul */, 10, 12, 30))) @@ -24,6 +24,11 @@ describe('addUTCMinutes', function () { assert.deepEqual(result, new Date(Date.UTC(2014, 6 /* Jul */, 10, 12, 20))) }) + it('implicitly converts number arguments', function () { + var result = addUTCMinutes(new Date(Date.UTC(2014, 6 /* Jul */, 10, 12, 0)), '30') + assert.deepEqual(result, new Date(Date.UTC(2014, 6 /* Jul */, 10, 12, 30))) + }) + it('does not mutate the original date', function () { var date = new Date(Date.UTC(2014, 6 /* Jul */, 10, 12, 0)) addUTCMinutes(date, 25) diff --git a/src/format/_lib/getUTCDayOfYear/index.js b/src/format/_lib/getUTCDayOfYear/index.js index 24d425aeea..249f2258d2 100644 --- a/src/format/_lib/getUTCDayOfYear/index.js +++ b/src/format/_lib/getUTCDayOfYear/index.js @@ -4,8 +4,8 @@ var MILLISECONDS_IN_DAY = 86400000 // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function getUTCDayOfYear (dirtyDate, options) { - var date = toDate(dirtyDate) +export default function getUTCDayOfYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var timestamp = date.getTime() date.setUTCMonth(0, 1) date.setUTCHours(0, 0, 0, 0) diff --git a/src/format/_lib/getUTCDayOfYear/test.js b/src/format/_lib/getUTCDayOfYear/test.js index 50a8da4ce3..cb90c38407 100644 --- a/src/format/_lib/getUTCDayOfYear/test.js +++ b/src/format/_lib/getUTCDayOfYear/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import getUTCDayOfYear from '.' -describe('getUTCDayOfYear', function () { +describe('format > getUTCDayOfYear', function () { it('returns the day of the year of the given date', function () { var result = getUTCDayOfYear(new Date(Date.UTC(2014, 6 /* Jul */, 2))) assert(result === 183) diff --git a/src/format/_lib/getUTCISOWeek/index.js b/src/format/_lib/getUTCISOWeek/index.js index 2ba562ebd3..6aa42e3519 100644 --- a/src/format/_lib/getUTCISOWeek/index.js +++ b/src/format/_lib/getUTCISOWeek/index.js @@ -6,9 +6,9 @@ var MILLISECONDS_IN_WEEK = 604800000 // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function getUTCISOWeek (dirtyDate, options) { - var date = toDate(dirtyDate, options) - var diff = startOfUTCISOWeek(date, options).getTime() - startOfUTCISOYear(date, options).getTime() +export default function getUTCISOWeek (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var diff = startOfUTCISOWeek(date, dirtyOptions).getTime() - startOfUTCISOYear(date, dirtyOptions).getTime() // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant diff --git a/src/format/_lib/getUTCISOWeek/test.js b/src/format/_lib/getUTCISOWeek/test.js index 41bef6f77d..e30c55a883 100644 --- a/src/format/_lib/getUTCISOWeek/test.js +++ b/src/format/_lib/getUTCISOWeek/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import getUTCISOWeek from '.' -describe('getUTCISOWeek', function () { +describe('format > getUTCISOWeek', function () { it('returns the ISO week of the given date', function () { var result = getUTCISOWeek(new Date(Date.UTC(2005, 0 /* Jan */, 2))) assert(result === 53) diff --git a/src/format/_lib/getUTCISOYear/index.js b/src/format/_lib/getUTCISOYear/index.js index 42b422151d..15f1470a74 100644 --- a/src/format/_lib/getUTCISOYear/index.js +++ b/src/format/_lib/getUTCISOYear/index.js @@ -3,19 +3,19 @@ import startOfUTCISOWeek from '../startOfUTCISOWeek/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function getUTCISOYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getUTCISOYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getUTCFullYear() var fourthOfJanuaryOfNextYear = new Date(0) fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4) fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0) - var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear, options) + var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear, dirtyOptions) var fourthOfJanuaryOfThisYear = new Date(0) fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4) fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0) - var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear, options) + var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear, dirtyOptions) if (date.getTime() >= startOfNextYear.getTime()) { return year + 1 diff --git a/src/format/_lib/getUTCISOYear/test.js b/src/format/_lib/getUTCISOYear/test.js index ef341624c3..41f3491175 100644 --- a/src/format/_lib/getUTCISOYear/test.js +++ b/src/format/_lib/getUTCISOYear/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import getUTCISOYear from '.' -describe('getUTCISOYear', function () { +describe('format > getUTCISOYear', function () { it('returns the ISO week-numbering year of the given date', function () { var result = getUTCISOYear(new Date(Date.UTC(2007, 11 /* Dec */, 31))) assert(result === 2008) diff --git a/src/format/_lib/startOfUTCISOWeek/index.js b/src/format/_lib/startOfUTCISOWeek/index.js index 335a09cf12..d1b9d84a38 100644 --- a/src/format/_lib/startOfUTCISOWeek/index.js +++ b/src/format/_lib/startOfUTCISOWeek/index.js @@ -2,10 +2,10 @@ import toDate from '../../../toDate/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function startOfUTCISOWeek (dirtyDate, options) { +export default function startOfUTCISOWeek (dirtyDate, dirtyOptions) { var weekStartsOn = 1 - var date = toDate(dirtyDate, options) + var date = toDate(dirtyDate, dirtyOptions) var day = date.getUTCDay() var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn diff --git a/src/format/_lib/startOfUTCISOWeek/test.js b/src/format/_lib/startOfUTCISOWeek/test.js index 85db34a9e9..db1e6f921c 100644 --- a/src/format/_lib/startOfUTCISOWeek/test.js +++ b/src/format/_lib/startOfUTCISOWeek/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import startOfUTCISOWeek from '.' -describe('startOfUTCISOWeek', function () { +describe('format > startOfUTCISOWeek', function () { it('returns the date with the time setted to 00:00:00 and the date setted to the first day of an ISO week', function () { var date = new Date(Date.UTC(2014, 8 /* Sep */, 2, 11, 55, 0)) var result = startOfUTCISOWeek(date) diff --git a/src/format/_lib/startOfUTCISOYear/index.js b/src/format/_lib/startOfUTCISOYear/index.js index 83ee382915..d1a6f57eec 100644 --- a/src/format/_lib/startOfUTCISOYear/index.js +++ b/src/format/_lib/startOfUTCISOYear/index.js @@ -3,11 +3,11 @@ import startOfUTCISOWeek from '../startOfUTCISOWeek/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function startOfUTCISOYear (dirtyDate, options) { - var year = getUTCISOYear(dirtyDate, options) +export default function startOfUTCISOYear (dirtyDate, dirtyOptions) { + var year = getUTCISOYear(dirtyDate, dirtyOptions) var fourthOfJanuary = new Date(0) fourthOfJanuary.setUTCFullYear(year, 0, 4) fourthOfJanuary.setUTCHours(0, 0, 0, 0) - var date = startOfUTCISOWeek(fourthOfJanuary, options) + var date = startOfUTCISOWeek(fourthOfJanuary, dirtyOptions) return date } diff --git a/src/format/_lib/startOfUTCISOYear/test.js b/src/format/_lib/startOfUTCISOYear/test.js index 5357bcd401..07578eb0d6 100644 --- a/src/format/_lib/startOfUTCISOYear/test.js +++ b/src/format/_lib/startOfUTCISOYear/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import startOfUTCISOYear from '.' -describe('startOfUTCISOYear', function () { +describe('format > startOfUTCISOYear', function () { it('returns the date with the time setted to 00:00:00 and the date setted to the first day of an ISO year', function () { var result = startOfUTCISOYear(new Date(Date.UTC(2009, 0 /* Jan */, 1, 16, 0))) assert.deepEqual(result, new Date(Date.UTC(2008, 11 /* Dec */, 29, 0, 0, 0, 0))) diff --git a/src/format/index.js.flow b/src/format/index.js.flow index d630d5ae85..75c1984b2f 100644 --- a/src/format/index.js.flow +++ b/src/format/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addDays/index.js.flow b/src/fp/addDays/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addDays/index.js.flow +++ b/src/fp/addDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addDaysWithOptions/index.js.flow b/src/fp/addDaysWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addDaysWithOptions/index.js.flow +++ b/src/fp/addDaysWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addHours/index.js.flow b/src/fp/addHours/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addHours/index.js.flow +++ b/src/fp/addHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addHoursWithOptions/index.js.flow b/src/fp/addHoursWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addHoursWithOptions/index.js.flow +++ b/src/fp/addHoursWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addISOYears/index.js.flow b/src/fp/addISOYears/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addISOYears/index.js.flow +++ b/src/fp/addISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addISOYearsWithOptions/index.js.flow b/src/fp/addISOYearsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addISOYearsWithOptions/index.js.flow +++ b/src/fp/addISOYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addMilliseconds/index.js.flow b/src/fp/addMilliseconds/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addMilliseconds/index.js.flow +++ b/src/fp/addMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addMillisecondsWithOptions/index.js.flow b/src/fp/addMillisecondsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addMillisecondsWithOptions/index.js.flow +++ b/src/fp/addMillisecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addMinutes/index.js.flow b/src/fp/addMinutes/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addMinutes/index.js.flow +++ b/src/fp/addMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addMinutesWithOptions/index.js.flow b/src/fp/addMinutesWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addMinutesWithOptions/index.js.flow +++ b/src/fp/addMinutesWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addMonths/index.js.flow b/src/fp/addMonths/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addMonths/index.js.flow +++ b/src/fp/addMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addMonthsWithOptions/index.js.flow b/src/fp/addMonthsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addMonthsWithOptions/index.js.flow +++ b/src/fp/addMonthsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addQuarters/index.js.flow b/src/fp/addQuarters/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addQuarters/index.js.flow +++ b/src/fp/addQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addQuartersWithOptions/index.js.flow b/src/fp/addQuartersWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addQuartersWithOptions/index.js.flow +++ b/src/fp/addQuartersWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addSeconds/index.js.flow b/src/fp/addSeconds/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addSeconds/index.js.flow +++ b/src/fp/addSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addSecondsWithOptions/index.js.flow b/src/fp/addSecondsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addSecondsWithOptions/index.js.flow +++ b/src/fp/addSecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addWeeks/index.js.flow b/src/fp/addWeeks/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addWeeks/index.js.flow +++ b/src/fp/addWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addWeeksWithOptions/index.js.flow b/src/fp/addWeeksWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addWeeksWithOptions/index.js.flow +++ b/src/fp/addWeeksWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addYears/index.js.flow b/src/fp/addYears/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/addYears/index.js.flow +++ b/src/fp/addYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/addYearsWithOptions/index.js.flow b/src/fp/addYearsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/addYearsWithOptions/index.js.flow +++ b/src/fp/addYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/areIntervalsOverlapping/index.js.flow b/src/fp/areIntervalsOverlapping/index.js.flow index 56922db2db..42e3c41073 100644 --- a/src/fp/areIntervalsOverlapping/index.js.flow +++ b/src/fp/areIntervalsOverlapping/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/areIntervalsOverlappingWithOptions/index.js.flow b/src/fp/areIntervalsOverlappingWithOptions/index.js.flow index 796bec3225..63a317d01d 100644 --- a/src/fp/areIntervalsOverlappingWithOptions/index.js.flow +++ b/src/fp/areIntervalsOverlappingWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/closestIndexTo/index.js.flow b/src/fp/closestIndexTo/index.js.flow index ee2dd5bdde..2af714e4e2 100644 --- a/src/fp/closestIndexTo/index.js.flow +++ b/src/fp/closestIndexTo/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/closestIndexToWithOptions/index.js.flow b/src/fp/closestIndexToWithOptions/index.js.flow index 4849b68de0..f79fde1bd3 100644 --- a/src/fp/closestIndexToWithOptions/index.js.flow +++ b/src/fp/closestIndexToWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/closestTo/index.js.flow b/src/fp/closestTo/index.js.flow index fe14877fae..5322d83e06 100644 --- a/src/fp/closestTo/index.js.flow +++ b/src/fp/closestTo/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/closestToWithOptions/index.js.flow b/src/fp/closestToWithOptions/index.js.flow index 42eef6cf09..e9344cdb25 100644 --- a/src/fp/closestToWithOptions/index.js.flow +++ b/src/fp/closestToWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/compareAsc/index.js.flow b/src/fp/compareAsc/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/compareAsc/index.js.flow +++ b/src/fp/compareAsc/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/compareAscWithOptions/index.js.flow b/src/fp/compareAscWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/compareAscWithOptions/index.js.flow +++ b/src/fp/compareAscWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/compareDesc/index.js.flow b/src/fp/compareDesc/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/compareDesc/index.js.flow +++ b/src/fp/compareDesc/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/compareDescWithOptions/index.js.flow b/src/fp/compareDescWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/compareDescWithOptions/index.js.flow +++ b/src/fp/compareDescWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarDays/index.js.flow b/src/fp/differenceInCalendarDays/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarDays/index.js.flow +++ b/src/fp/differenceInCalendarDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarDaysWithOptions/index.js.flow b/src/fp/differenceInCalendarDaysWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarDaysWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarDaysWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarISOWeeks/index.js.flow b/src/fp/differenceInCalendarISOWeeks/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarISOWeeks/index.js.flow +++ b/src/fp/differenceInCalendarISOWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarISOWeeksWithOptions/index.js.flow b/src/fp/differenceInCalendarISOWeeksWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarISOWeeksWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarISOWeeksWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarISOYears/index.js.flow b/src/fp/differenceInCalendarISOYears/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarISOYears/index.js.flow +++ b/src/fp/differenceInCalendarISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarISOYearsWithOptions/index.js.flow b/src/fp/differenceInCalendarISOYearsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarISOYearsWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarISOYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarMonths/index.js.flow b/src/fp/differenceInCalendarMonths/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarMonths/index.js.flow +++ b/src/fp/differenceInCalendarMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarMonthsWithOptions/index.js.flow b/src/fp/differenceInCalendarMonthsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarMonthsWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarMonthsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarQuarters/index.js.flow b/src/fp/differenceInCalendarQuarters/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarQuarters/index.js.flow +++ b/src/fp/differenceInCalendarQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarQuartersWithOptions/index.js.flow b/src/fp/differenceInCalendarQuartersWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarQuartersWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarQuartersWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarWeeks/index.js.flow b/src/fp/differenceInCalendarWeeks/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarWeeks/index.js.flow +++ b/src/fp/differenceInCalendarWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarWeeksWithOptions/index.js.flow b/src/fp/differenceInCalendarWeeksWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarWeeksWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarWeeksWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarYears/index.js.flow b/src/fp/differenceInCalendarYears/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInCalendarYears/index.js.flow +++ b/src/fp/differenceInCalendarYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInCalendarYearsWithOptions/index.js.flow b/src/fp/differenceInCalendarYearsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInCalendarYearsWithOptions/index.js.flow +++ b/src/fp/differenceInCalendarYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInDays/index.js.flow b/src/fp/differenceInDays/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInDays/index.js.flow +++ b/src/fp/differenceInDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInDaysWithOptions/index.js.flow b/src/fp/differenceInDaysWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInDaysWithOptions/index.js.flow +++ b/src/fp/differenceInDaysWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInHours/index.js.flow b/src/fp/differenceInHours/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInHours/index.js.flow +++ b/src/fp/differenceInHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInHoursWithOptions/index.js.flow b/src/fp/differenceInHoursWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInHoursWithOptions/index.js.flow +++ b/src/fp/differenceInHoursWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInISOYears/index.js.flow b/src/fp/differenceInISOYears/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInISOYears/index.js.flow +++ b/src/fp/differenceInISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInISOYearsWithOptions/index.js.flow b/src/fp/differenceInISOYearsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInISOYearsWithOptions/index.js.flow +++ b/src/fp/differenceInISOYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInMilliseconds/index.js.flow b/src/fp/differenceInMilliseconds/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInMilliseconds/index.js.flow +++ b/src/fp/differenceInMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInMillisecondsWithOptions/index.js.flow b/src/fp/differenceInMillisecondsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInMillisecondsWithOptions/index.js.flow +++ b/src/fp/differenceInMillisecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInMinutes/index.js.flow b/src/fp/differenceInMinutes/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInMinutes/index.js.flow +++ b/src/fp/differenceInMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInMinutesWithOptions/index.js.flow b/src/fp/differenceInMinutesWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInMinutesWithOptions/index.js.flow +++ b/src/fp/differenceInMinutesWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInMonths/index.js.flow b/src/fp/differenceInMonths/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInMonths/index.js.flow +++ b/src/fp/differenceInMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInMonthsWithOptions/index.js.flow b/src/fp/differenceInMonthsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInMonthsWithOptions/index.js.flow +++ b/src/fp/differenceInMonthsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInQuarters/index.js.flow b/src/fp/differenceInQuarters/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInQuarters/index.js.flow +++ b/src/fp/differenceInQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInQuartersWithOptions/index.js.flow b/src/fp/differenceInQuartersWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInQuartersWithOptions/index.js.flow +++ b/src/fp/differenceInQuartersWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInSeconds/index.js.flow b/src/fp/differenceInSeconds/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInSeconds/index.js.flow +++ b/src/fp/differenceInSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInSecondsWithOptions/index.js.flow b/src/fp/differenceInSecondsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInSecondsWithOptions/index.js.flow +++ b/src/fp/differenceInSecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInWeeks/index.js.flow b/src/fp/differenceInWeeks/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInWeeks/index.js.flow +++ b/src/fp/differenceInWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInWeeksWithOptions/index.js.flow b/src/fp/differenceInWeeksWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInWeeksWithOptions/index.js.flow +++ b/src/fp/differenceInWeeksWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInYears/index.js.flow b/src/fp/differenceInYears/index.js.flow index bc50e09a33..b022ca22db 100644 --- a/src/fp/differenceInYears/index.js.flow +++ b/src/fp/differenceInYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/differenceInYearsWithOptions/index.js.flow b/src/fp/differenceInYearsWithOptions/index.js.flow index d7297b4614..674ae4e95b 100644 --- a/src/fp/differenceInYearsWithOptions/index.js.flow +++ b/src/fp/differenceInYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/distanceInWords/index.js.flow b/src/fp/distanceInWords/index.js.flow index ef552542e1..bb454020e2 100644 --- a/src/fp/distanceInWords/index.js.flow +++ b/src/fp/distanceInWords/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/distanceInWordsStrict/index.js.flow b/src/fp/distanceInWordsStrict/index.js.flow index ef552542e1..bb454020e2 100644 --- a/src/fp/distanceInWordsStrict/index.js.flow +++ b/src/fp/distanceInWordsStrict/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/distanceInWordsStrictWithOptions/index.js.flow b/src/fp/distanceInWordsStrictWithOptions/index.js.flow index ae2b4e3002..76cb490569 100644 --- a/src/fp/distanceInWordsStrictWithOptions/index.js.flow +++ b/src/fp/distanceInWordsStrictWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/distanceInWordsWithOptions/index.js.flow b/src/fp/distanceInWordsWithOptions/index.js.flow index ae2b4e3002..76cb490569 100644 --- a/src/fp/distanceInWordsWithOptions/index.js.flow +++ b/src/fp/distanceInWordsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/eachDayOfInterval/index.js.flow b/src/fp/eachDayOfInterval/index.js.flow index 68665e1c69..9227e593b0 100644 --- a/src/fp/eachDayOfInterval/index.js.flow +++ b/src/fp/eachDayOfInterval/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/eachDayOfIntervalWithOptions/index.js.flow b/src/fp/eachDayOfIntervalWithOptions/index.js.flow index cd6d98f869..725b7cfa12 100644 --- a/src/fp/eachDayOfIntervalWithOptions/index.js.flow +++ b/src/fp/eachDayOfIntervalWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfDay/index.js.flow b/src/fp/endOfDay/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfDay/index.js.flow +++ b/src/fp/endOfDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfDayWithOptions/index.js.flow b/src/fp/endOfDayWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfDayWithOptions/index.js.flow +++ b/src/fp/endOfDayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfHour/index.js.flow b/src/fp/endOfHour/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfHour/index.js.flow +++ b/src/fp/endOfHour/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfHourWithOptions/index.js.flow b/src/fp/endOfHourWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfHourWithOptions/index.js.flow +++ b/src/fp/endOfHourWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfISOWeek/index.js.flow b/src/fp/endOfISOWeek/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfISOWeek/index.js.flow +++ b/src/fp/endOfISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfISOWeekWithOptions/index.js.flow b/src/fp/endOfISOWeekWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfISOWeekWithOptions/index.js.flow +++ b/src/fp/endOfISOWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfISOYear/index.js.flow b/src/fp/endOfISOYear/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfISOYear/index.js.flow +++ b/src/fp/endOfISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfISOYearWithOptions/index.js.flow b/src/fp/endOfISOYearWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfISOYearWithOptions/index.js.flow +++ b/src/fp/endOfISOYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfMinute/index.js.flow b/src/fp/endOfMinute/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfMinute/index.js.flow +++ b/src/fp/endOfMinute/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfMinuteWithOptions/index.js.flow b/src/fp/endOfMinuteWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfMinuteWithOptions/index.js.flow +++ b/src/fp/endOfMinuteWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfMonth/index.js.flow b/src/fp/endOfMonth/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfMonth/index.js.flow +++ b/src/fp/endOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfMonthWithOptions/index.js.flow b/src/fp/endOfMonthWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfMonthWithOptions/index.js.flow +++ b/src/fp/endOfMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfQuarter/index.js.flow b/src/fp/endOfQuarter/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfQuarter/index.js.flow +++ b/src/fp/endOfQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfQuarterWithOptions/index.js.flow b/src/fp/endOfQuarterWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfQuarterWithOptions/index.js.flow +++ b/src/fp/endOfQuarterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfSecond/index.js.flow b/src/fp/endOfSecond/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfSecond/index.js.flow +++ b/src/fp/endOfSecond/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfSecondWithOptions/index.js.flow b/src/fp/endOfSecondWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfSecondWithOptions/index.js.flow +++ b/src/fp/endOfSecondWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfWeek/index.js.flow b/src/fp/endOfWeek/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfWeek/index.js.flow +++ b/src/fp/endOfWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfWeekWithOptions/index.js.flow b/src/fp/endOfWeekWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfWeekWithOptions/index.js.flow +++ b/src/fp/endOfWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfYear/index.js.flow b/src/fp/endOfYear/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/endOfYear/index.js.flow +++ b/src/fp/endOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/endOfYearWithOptions/index.js.flow b/src/fp/endOfYearWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/endOfYearWithOptions/index.js.flow +++ b/src/fp/endOfYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/format/index.js.flow b/src/fp/format/index.js.flow index 6167096c4d..13dfc8dbd2 100644 --- a/src/fp/format/index.js.flow +++ b/src/fp/format/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/formatWithOptions/index.js.flow b/src/fp/formatWithOptions/index.js.flow index ff493ffb99..4ff39ce0de 100644 --- a/src/fp/formatWithOptions/index.js.flow +++ b/src/fp/formatWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDate/index.js.flow b/src/fp/getDate/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getDate/index.js.flow +++ b/src/fp/getDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDateWithOptions/index.js.flow b/src/fp/getDateWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getDateWithOptions/index.js.flow +++ b/src/fp/getDateWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDay/index.js.flow b/src/fp/getDay/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getDay/index.js.flow +++ b/src/fp/getDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDayOfYear/index.js.flow b/src/fp/getDayOfYear/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getDayOfYear/index.js.flow +++ b/src/fp/getDayOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDayOfYearWithOptions/index.js.flow b/src/fp/getDayOfYearWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getDayOfYearWithOptions/index.js.flow +++ b/src/fp/getDayOfYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDayWithOptions/index.js.flow b/src/fp/getDayWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getDayWithOptions/index.js.flow +++ b/src/fp/getDayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDaysInMonth/index.js.flow b/src/fp/getDaysInMonth/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getDaysInMonth/index.js.flow +++ b/src/fp/getDaysInMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDaysInMonthWithOptions/index.js.flow b/src/fp/getDaysInMonthWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getDaysInMonthWithOptions/index.js.flow +++ b/src/fp/getDaysInMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDaysInYear/index.js.flow b/src/fp/getDaysInYear/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getDaysInYear/index.js.flow +++ b/src/fp/getDaysInYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getDaysInYearWithOptions/index.js.flow b/src/fp/getDaysInYearWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getDaysInYearWithOptions/index.js.flow +++ b/src/fp/getDaysInYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getHours/index.js.flow b/src/fp/getHours/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getHours/index.js.flow +++ b/src/fp/getHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getHoursWithOptions/index.js.flow b/src/fp/getHoursWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getHoursWithOptions/index.js.flow +++ b/src/fp/getHoursWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISODay/index.js.flow b/src/fp/getISODay/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getISODay/index.js.flow +++ b/src/fp/getISODay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISODayWithOptions/index.js.flow b/src/fp/getISODayWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getISODayWithOptions/index.js.flow +++ b/src/fp/getISODayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISOWeek/index.js.flow b/src/fp/getISOWeek/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getISOWeek/index.js.flow +++ b/src/fp/getISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISOWeekWithOptions/index.js.flow b/src/fp/getISOWeekWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getISOWeekWithOptions/index.js.flow +++ b/src/fp/getISOWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISOWeeksInYear/index.js.flow b/src/fp/getISOWeeksInYear/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getISOWeeksInYear/index.js.flow +++ b/src/fp/getISOWeeksInYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISOWeeksInYearWithOptions/index.js.flow b/src/fp/getISOWeeksInYearWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getISOWeeksInYearWithOptions/index.js.flow +++ b/src/fp/getISOWeeksInYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISOYear/index.js.flow b/src/fp/getISOYear/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getISOYear/index.js.flow +++ b/src/fp/getISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getISOYearWithOptions/index.js.flow b/src/fp/getISOYearWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getISOYearWithOptions/index.js.flow +++ b/src/fp/getISOYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getMilliseconds/index.js.flow b/src/fp/getMilliseconds/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getMilliseconds/index.js.flow +++ b/src/fp/getMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getMillisecondsWithOptions/index.js.flow b/src/fp/getMillisecondsWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getMillisecondsWithOptions/index.js.flow +++ b/src/fp/getMillisecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getMinutes/index.js.flow b/src/fp/getMinutes/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getMinutes/index.js.flow +++ b/src/fp/getMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getMinutesWithOptions/index.js.flow b/src/fp/getMinutesWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getMinutesWithOptions/index.js.flow +++ b/src/fp/getMinutesWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getMonth/index.js.flow b/src/fp/getMonth/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getMonth/index.js.flow +++ b/src/fp/getMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getMonthWithOptions/index.js.flow b/src/fp/getMonthWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getMonthWithOptions/index.js.flow +++ b/src/fp/getMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getOverlappingDaysInIntervals/index.js.flow b/src/fp/getOverlappingDaysInIntervals/index.js.flow index 87597ecb4d..14ba1f2d9a 100644 --- a/src/fp/getOverlappingDaysInIntervals/index.js.flow +++ b/src/fp/getOverlappingDaysInIntervals/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getOverlappingDaysInIntervalsWithOptions/index.js.flow b/src/fp/getOverlappingDaysInIntervalsWithOptions/index.js.flow index 22e4384c44..282e6eb35f 100644 --- a/src/fp/getOverlappingDaysInIntervalsWithOptions/index.js.flow +++ b/src/fp/getOverlappingDaysInIntervalsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getQuarter/index.js.flow b/src/fp/getQuarter/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getQuarter/index.js.flow +++ b/src/fp/getQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getQuarterWithOptions/index.js.flow b/src/fp/getQuarterWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getQuarterWithOptions/index.js.flow +++ b/src/fp/getQuarterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getSeconds/index.js.flow b/src/fp/getSeconds/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getSeconds/index.js.flow +++ b/src/fp/getSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getSecondsWithOptions/index.js.flow b/src/fp/getSecondsWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getSecondsWithOptions/index.js.flow +++ b/src/fp/getSecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getTime/index.js.flow b/src/fp/getTime/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getTime/index.js.flow +++ b/src/fp/getTime/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getTimeWithOptions/index.js.flow b/src/fp/getTimeWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getTimeWithOptions/index.js.flow +++ b/src/fp/getTimeWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getYear/index.js.flow b/src/fp/getYear/index.js.flow index 17244cb65b..4f8808a755 100644 --- a/src/fp/getYear/index.js.flow +++ b/src/fp/getYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/getYearWithOptions/index.js.flow b/src/fp/getYearWithOptions/index.js.flow index 27fa2dd2a5..7b7451c0ff 100644 --- a/src/fp/getYearWithOptions/index.js.flow +++ b/src/fp/getYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isAfter/index.js.flow b/src/fp/isAfter/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isAfter/index.js.flow +++ b/src/fp/isAfter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isAfterWithOptions/index.js.flow b/src/fp/isAfterWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isAfterWithOptions/index.js.flow +++ b/src/fp/isAfterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isBefore/index.js.flow b/src/fp/isBefore/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isBefore/index.js.flow +++ b/src/fp/isBefore/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isBeforeWithOptions/index.js.flow b/src/fp/isBeforeWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isBeforeWithOptions/index.js.flow +++ b/src/fp/isBeforeWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isDate/index.js.flow b/src/fp/isDate/index.js.flow index df0be3383e..4434f50c4d 100644 --- a/src/fp/isDate/index.js.flow +++ b/src/fp/isDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isDateWithOptions/index.js.flow b/src/fp/isDateWithOptions/index.js.flow index e0fc5e2554..fa42f18b92 100644 --- a/src/fp/isDateWithOptions/index.js.flow +++ b/src/fp/isDateWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isEqual/index.js.flow b/src/fp/isEqual/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isEqual/index.js.flow +++ b/src/fp/isEqual/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isEqualWithOptions/index.js.flow b/src/fp/isEqualWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isEqualWithOptions/index.js.flow +++ b/src/fp/isEqualWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isFirstDayOfMonth/index.js.flow b/src/fp/isFirstDayOfMonth/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isFirstDayOfMonth/index.js.flow +++ b/src/fp/isFirstDayOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isFirstDayOfMonthWithOptions/index.js.flow b/src/fp/isFirstDayOfMonthWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isFirstDayOfMonthWithOptions/index.js.flow +++ b/src/fp/isFirstDayOfMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isFriday/index.js.flow b/src/fp/isFriday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isFriday/index.js.flow +++ b/src/fp/isFriday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isFridayWithOptions/index.js.flow b/src/fp/isFridayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isFridayWithOptions/index.js.flow +++ b/src/fp/isFridayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isLastDayOfMonth/index.js.flow b/src/fp/isLastDayOfMonth/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isLastDayOfMonth/index.js.flow +++ b/src/fp/isLastDayOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isLastDayOfMonthWithOptions/index.js.flow b/src/fp/isLastDayOfMonthWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isLastDayOfMonthWithOptions/index.js.flow +++ b/src/fp/isLastDayOfMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isLeapYear/index.js.flow b/src/fp/isLeapYear/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isLeapYear/index.js.flow +++ b/src/fp/isLeapYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isLeapYearWithOptions/index.js.flow b/src/fp/isLeapYearWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isLeapYearWithOptions/index.js.flow +++ b/src/fp/isLeapYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isMonday/index.js.flow b/src/fp/isMonday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isMonday/index.js.flow +++ b/src/fp/isMonday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isMondayWithOptions/index.js.flow b/src/fp/isMondayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isMondayWithOptions/index.js.flow +++ b/src/fp/isMondayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameDay/index.js.flow b/src/fp/isSameDay/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameDay/index.js.flow +++ b/src/fp/isSameDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameDayWithOptions/index.js.flow b/src/fp/isSameDayWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameDayWithOptions/index.js.flow +++ b/src/fp/isSameDayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameHour/index.js.flow b/src/fp/isSameHour/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameHour/index.js.flow +++ b/src/fp/isSameHour/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameHourWithOptions/index.js.flow b/src/fp/isSameHourWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameHourWithOptions/index.js.flow +++ b/src/fp/isSameHourWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameISOWeek/index.js.flow b/src/fp/isSameISOWeek/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameISOWeek/index.js.flow +++ b/src/fp/isSameISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameISOWeekWithOptions/index.js.flow b/src/fp/isSameISOWeekWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameISOWeekWithOptions/index.js.flow +++ b/src/fp/isSameISOWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameISOYear/index.js.flow b/src/fp/isSameISOYear/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameISOYear/index.js.flow +++ b/src/fp/isSameISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameISOYearWithOptions/index.js.flow b/src/fp/isSameISOYearWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameISOYearWithOptions/index.js.flow +++ b/src/fp/isSameISOYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameMinute/index.js.flow b/src/fp/isSameMinute/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameMinute/index.js.flow +++ b/src/fp/isSameMinute/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameMinuteWithOptions/index.js.flow b/src/fp/isSameMinuteWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameMinuteWithOptions/index.js.flow +++ b/src/fp/isSameMinuteWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameMonth/index.js.flow b/src/fp/isSameMonth/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameMonth/index.js.flow +++ b/src/fp/isSameMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameMonthWithOptions/index.js.flow b/src/fp/isSameMonthWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameMonthWithOptions/index.js.flow +++ b/src/fp/isSameMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameQuarter/index.js.flow b/src/fp/isSameQuarter/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameQuarter/index.js.flow +++ b/src/fp/isSameQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameQuarterWithOptions/index.js.flow b/src/fp/isSameQuarterWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameQuarterWithOptions/index.js.flow +++ b/src/fp/isSameQuarterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameSecond/index.js.flow b/src/fp/isSameSecond/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameSecond/index.js.flow +++ b/src/fp/isSameSecond/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameSecondWithOptions/index.js.flow b/src/fp/isSameSecondWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameSecondWithOptions/index.js.flow +++ b/src/fp/isSameSecondWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameWeek/index.js.flow b/src/fp/isSameWeek/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameWeek/index.js.flow +++ b/src/fp/isSameWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameWeekWithOptions/index.js.flow b/src/fp/isSameWeekWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameWeekWithOptions/index.js.flow +++ b/src/fp/isSameWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameYear/index.js.flow b/src/fp/isSameYear/index.js.flow index ff21680a23..cdb04cbe59 100644 --- a/src/fp/isSameYear/index.js.flow +++ b/src/fp/isSameYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSameYearWithOptions/index.js.flow b/src/fp/isSameYearWithOptions/index.js.flow index 5a718b5022..b6750b62a4 100644 --- a/src/fp/isSameYearWithOptions/index.js.flow +++ b/src/fp/isSameYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSaturday/index.js.flow b/src/fp/isSaturday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isSaturday/index.js.flow +++ b/src/fp/isSaturday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSaturdayWithOptions/index.js.flow b/src/fp/isSaturdayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isSaturdayWithOptions/index.js.flow +++ b/src/fp/isSaturdayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSunday/index.js.flow b/src/fp/isSunday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isSunday/index.js.flow +++ b/src/fp/isSunday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isSundayWithOptions/index.js.flow b/src/fp/isSundayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isSundayWithOptions/index.js.flow +++ b/src/fp/isSundayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isThursday/index.js.flow b/src/fp/isThursday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isThursday/index.js.flow +++ b/src/fp/isThursday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isThursdayWithOptions/index.js.flow b/src/fp/isThursdayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isThursdayWithOptions/index.js.flow +++ b/src/fp/isThursdayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isTuesday/index.js.flow b/src/fp/isTuesday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isTuesday/index.js.flow +++ b/src/fp/isTuesday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isTuesdayWithOptions/index.js.flow b/src/fp/isTuesdayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isTuesdayWithOptions/index.js.flow +++ b/src/fp/isTuesdayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isValid/index.js.flow b/src/fp/isValid/index.js.flow index 3ec01a5ddf..6a4b522fff 100644 --- a/src/fp/isValid/index.js.flow +++ b/src/fp/isValid/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isValidWithOptions/index.js.flow b/src/fp/isValidWithOptions/index.js.flow index bfb6a8bc55..4ba9c84994 100644 --- a/src/fp/isValidWithOptions/index.js.flow +++ b/src/fp/isValidWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isWednesday/index.js.flow b/src/fp/isWednesday/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isWednesday/index.js.flow +++ b/src/fp/isWednesday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isWednesdayWithOptions/index.js.flow b/src/fp/isWednesdayWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isWednesdayWithOptions/index.js.flow +++ b/src/fp/isWednesdayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isWeekend/index.js.flow b/src/fp/isWeekend/index.js.flow index a99035889b..39ada5eb51 100644 --- a/src/fp/isWeekend/index.js.flow +++ b/src/fp/isWeekend/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isWeekendWithOptions/index.js.flow b/src/fp/isWeekendWithOptions/index.js.flow index 7f2bbb503b..2f4fc7040d 100644 --- a/src/fp/isWeekendWithOptions/index.js.flow +++ b/src/fp/isWeekendWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isWithinInterval/index.js.flow b/src/fp/isWithinInterval/index.js.flow index 6881814a8a..3f2728fb50 100644 --- a/src/fp/isWithinInterval/index.js.flow +++ b/src/fp/isWithinInterval/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/isWithinIntervalWithOptions/index.js.flow b/src/fp/isWithinIntervalWithOptions/index.js.flow index d197f71a6d..0689232937 100644 --- a/src/fp/isWithinIntervalWithOptions/index.js.flow +++ b/src/fp/isWithinIntervalWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfISOWeek/index.js.flow b/src/fp/lastDayOfISOWeek/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/lastDayOfISOWeek/index.js.flow +++ b/src/fp/lastDayOfISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfISOWeekWithOptions/index.js.flow b/src/fp/lastDayOfISOWeekWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/lastDayOfISOWeekWithOptions/index.js.flow +++ b/src/fp/lastDayOfISOWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfISOYear/index.js.flow b/src/fp/lastDayOfISOYear/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/lastDayOfISOYear/index.js.flow +++ b/src/fp/lastDayOfISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfISOYearWithOptions/index.js.flow b/src/fp/lastDayOfISOYearWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/lastDayOfISOYearWithOptions/index.js.flow +++ b/src/fp/lastDayOfISOYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfMonth/index.js.flow b/src/fp/lastDayOfMonth/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/lastDayOfMonth/index.js.flow +++ b/src/fp/lastDayOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfMonthWithOptions/index.js.flow b/src/fp/lastDayOfMonthWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/lastDayOfMonthWithOptions/index.js.flow +++ b/src/fp/lastDayOfMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfQuarter/index.js.flow b/src/fp/lastDayOfQuarter/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/lastDayOfQuarter/index.js.flow +++ b/src/fp/lastDayOfQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfQuarterWithOptions/index.js.flow b/src/fp/lastDayOfQuarterWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/lastDayOfQuarterWithOptions/index.js.flow +++ b/src/fp/lastDayOfQuarterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfWeek/index.js.flow b/src/fp/lastDayOfWeek/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/lastDayOfWeek/index.js.flow +++ b/src/fp/lastDayOfWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfWeekWithOptions/index.js.flow b/src/fp/lastDayOfWeekWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/lastDayOfWeekWithOptions/index.js.flow +++ b/src/fp/lastDayOfWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfYear/index.js.flow b/src/fp/lastDayOfYear/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/lastDayOfYear/index.js.flow +++ b/src/fp/lastDayOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/lastDayOfYearWithOptions/index.js.flow b/src/fp/lastDayOfYearWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/lastDayOfYearWithOptions/index.js.flow +++ b/src/fp/lastDayOfYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/max/index.js.flow b/src/fp/max/index.js.flow index c7c32f34e7..3764c39a86 100644 --- a/src/fp/max/index.js.flow +++ b/src/fp/max/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/maxWithOptions/index.js.flow b/src/fp/maxWithOptions/index.js.flow index 01a38026e3..2285dcdf70 100644 --- a/src/fp/maxWithOptions/index.js.flow +++ b/src/fp/maxWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/min/index.js.flow b/src/fp/min/index.js.flow index c7c32f34e7..3764c39a86 100644 --- a/src/fp/min/index.js.flow +++ b/src/fp/min/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/minWithOptions/index.js.flow b/src/fp/minWithOptions/index.js.flow index 01a38026e3..2285dcdf70 100644 --- a/src/fp/minWithOptions/index.js.flow +++ b/src/fp/minWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/parse/index.js.flow b/src/fp/parse/index.js.flow index 24a1662ae0..3a36d0266c 100644 --- a/src/fp/parse/index.js.flow +++ b/src/fp/parse/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/parseWithOptions/index.js.flow b/src/fp/parseWithOptions/index.js.flow index 57798195bd..8bbe9b0dc4 100644 --- a/src/fp/parseWithOptions/index.js.flow +++ b/src/fp/parseWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setDate/index.js.flow b/src/fp/setDate/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setDate/index.js.flow +++ b/src/fp/setDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setDateWithOptions/index.js.flow b/src/fp/setDateWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setDateWithOptions/index.js.flow +++ b/src/fp/setDateWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setDay/index.js.flow b/src/fp/setDay/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setDay/index.js.flow +++ b/src/fp/setDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setDayOfYear/index.js.flow b/src/fp/setDayOfYear/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setDayOfYear/index.js.flow +++ b/src/fp/setDayOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setDayOfYearWithOptions/index.js.flow b/src/fp/setDayOfYearWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setDayOfYearWithOptions/index.js.flow +++ b/src/fp/setDayOfYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setDayWithOptions/index.js.flow b/src/fp/setDayWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setDayWithOptions/index.js.flow +++ b/src/fp/setDayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setHours/index.js.flow b/src/fp/setHours/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setHours/index.js.flow +++ b/src/fp/setHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setHoursWithOptions/index.js.flow b/src/fp/setHoursWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setHoursWithOptions/index.js.flow +++ b/src/fp/setHoursWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setISODay/index.js.flow b/src/fp/setISODay/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setISODay/index.js.flow +++ b/src/fp/setISODay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setISODayWithOptions/index.js.flow b/src/fp/setISODayWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setISODayWithOptions/index.js.flow +++ b/src/fp/setISODayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setISOWeek/index.js.flow b/src/fp/setISOWeek/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setISOWeek/index.js.flow +++ b/src/fp/setISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setISOWeekWithOptions/index.js.flow b/src/fp/setISOWeekWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setISOWeekWithOptions/index.js.flow +++ b/src/fp/setISOWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setISOYear/index.js.flow b/src/fp/setISOYear/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setISOYear/index.js.flow +++ b/src/fp/setISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setISOYearWithOptions/index.js.flow b/src/fp/setISOYearWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setISOYearWithOptions/index.js.flow +++ b/src/fp/setISOYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setMilliseconds/index.js.flow b/src/fp/setMilliseconds/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setMilliseconds/index.js.flow +++ b/src/fp/setMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setMillisecondsWithOptions/index.js.flow b/src/fp/setMillisecondsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setMillisecondsWithOptions/index.js.flow +++ b/src/fp/setMillisecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setMinutes/index.js.flow b/src/fp/setMinutes/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setMinutes/index.js.flow +++ b/src/fp/setMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setMinutesWithOptions/index.js.flow b/src/fp/setMinutesWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setMinutesWithOptions/index.js.flow +++ b/src/fp/setMinutesWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setMonth/index.js.flow b/src/fp/setMonth/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setMonth/index.js.flow +++ b/src/fp/setMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setMonthWithOptions/index.js.flow b/src/fp/setMonthWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setMonthWithOptions/index.js.flow +++ b/src/fp/setMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setQuarter/index.js.flow b/src/fp/setQuarter/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setQuarter/index.js.flow +++ b/src/fp/setQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setQuarterWithOptions/index.js.flow b/src/fp/setQuarterWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setQuarterWithOptions/index.js.flow +++ b/src/fp/setQuarterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setSeconds/index.js.flow b/src/fp/setSeconds/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setSeconds/index.js.flow +++ b/src/fp/setSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setSecondsWithOptions/index.js.flow b/src/fp/setSecondsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setSecondsWithOptions/index.js.flow +++ b/src/fp/setSecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setYear/index.js.flow b/src/fp/setYear/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/setYear/index.js.flow +++ b/src/fp/setYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/setYearWithOptions/index.js.flow b/src/fp/setYearWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/setYearWithOptions/index.js.flow +++ b/src/fp/setYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfDay/index.js.flow b/src/fp/startOfDay/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfDay/index.js.flow +++ b/src/fp/startOfDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfDayWithOptions/index.js.flow b/src/fp/startOfDayWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfDayWithOptions/index.js.flow +++ b/src/fp/startOfDayWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfHour/index.js.flow b/src/fp/startOfHour/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfHour/index.js.flow +++ b/src/fp/startOfHour/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfHourWithOptions/index.js.flow b/src/fp/startOfHourWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfHourWithOptions/index.js.flow +++ b/src/fp/startOfHourWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfISOWeek/index.js.flow b/src/fp/startOfISOWeek/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfISOWeek/index.js.flow +++ b/src/fp/startOfISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfISOWeekWithOptions/index.js.flow b/src/fp/startOfISOWeekWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfISOWeekWithOptions/index.js.flow +++ b/src/fp/startOfISOWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfISOYear/index.js.flow b/src/fp/startOfISOYear/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfISOYear/index.js.flow +++ b/src/fp/startOfISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfISOYearWithOptions/index.js.flow b/src/fp/startOfISOYearWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfISOYearWithOptions/index.js.flow +++ b/src/fp/startOfISOYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfMinute/index.js.flow b/src/fp/startOfMinute/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfMinute/index.js.flow +++ b/src/fp/startOfMinute/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfMinuteWithOptions/index.js.flow b/src/fp/startOfMinuteWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfMinuteWithOptions/index.js.flow +++ b/src/fp/startOfMinuteWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfMonth/index.js.flow b/src/fp/startOfMonth/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfMonth/index.js.flow +++ b/src/fp/startOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfMonthWithOptions/index.js.flow b/src/fp/startOfMonthWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfMonthWithOptions/index.js.flow +++ b/src/fp/startOfMonthWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfQuarter/index.js.flow b/src/fp/startOfQuarter/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfQuarter/index.js.flow +++ b/src/fp/startOfQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfQuarterWithOptions/index.js.flow b/src/fp/startOfQuarterWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfQuarterWithOptions/index.js.flow +++ b/src/fp/startOfQuarterWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfSecond/index.js.flow b/src/fp/startOfSecond/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfSecond/index.js.flow +++ b/src/fp/startOfSecond/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfSecondWithOptions/index.js.flow b/src/fp/startOfSecondWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfSecondWithOptions/index.js.flow +++ b/src/fp/startOfSecondWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfWeek/index.js.flow b/src/fp/startOfWeek/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfWeek/index.js.flow +++ b/src/fp/startOfWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfWeekWithOptions/index.js.flow b/src/fp/startOfWeekWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfWeekWithOptions/index.js.flow +++ b/src/fp/startOfWeekWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfYear/index.js.flow b/src/fp/startOfYear/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/startOfYear/index.js.flow +++ b/src/fp/startOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/startOfYearWithOptions/index.js.flow b/src/fp/startOfYearWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/startOfYearWithOptions/index.js.flow +++ b/src/fp/startOfYearWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subDays/index.js.flow b/src/fp/subDays/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subDays/index.js.flow +++ b/src/fp/subDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subDaysWithOptions/index.js.flow b/src/fp/subDaysWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subDaysWithOptions/index.js.flow +++ b/src/fp/subDaysWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subHours/index.js.flow b/src/fp/subHours/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subHours/index.js.flow +++ b/src/fp/subHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subHoursWithOptions/index.js.flow b/src/fp/subHoursWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subHoursWithOptions/index.js.flow +++ b/src/fp/subHoursWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subISOYears/index.js.flow b/src/fp/subISOYears/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subISOYears/index.js.flow +++ b/src/fp/subISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subISOYearsWithOptions/index.js.flow b/src/fp/subISOYearsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subISOYearsWithOptions/index.js.flow +++ b/src/fp/subISOYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subMilliseconds/index.js.flow b/src/fp/subMilliseconds/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subMilliseconds/index.js.flow +++ b/src/fp/subMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subMillisecondsWithOptions/index.js.flow b/src/fp/subMillisecondsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subMillisecondsWithOptions/index.js.flow +++ b/src/fp/subMillisecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subMinutes/index.js.flow b/src/fp/subMinutes/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subMinutes/index.js.flow +++ b/src/fp/subMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subMinutesWithOptions/index.js.flow b/src/fp/subMinutesWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subMinutesWithOptions/index.js.flow +++ b/src/fp/subMinutesWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subMonths/index.js.flow b/src/fp/subMonths/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subMonths/index.js.flow +++ b/src/fp/subMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subMonthsWithOptions/index.js.flow b/src/fp/subMonthsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subMonthsWithOptions/index.js.flow +++ b/src/fp/subMonthsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subQuarters/index.js.flow b/src/fp/subQuarters/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subQuarters/index.js.flow +++ b/src/fp/subQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subQuartersWithOptions/index.js.flow b/src/fp/subQuartersWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subQuartersWithOptions/index.js.flow +++ b/src/fp/subQuartersWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subSeconds/index.js.flow b/src/fp/subSeconds/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subSeconds/index.js.flow +++ b/src/fp/subSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subSecondsWithOptions/index.js.flow b/src/fp/subSecondsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subSecondsWithOptions/index.js.flow +++ b/src/fp/subSecondsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subWeeks/index.js.flow b/src/fp/subWeeks/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subWeeks/index.js.flow +++ b/src/fp/subWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subWeeksWithOptions/index.js.flow b/src/fp/subWeeksWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subWeeksWithOptions/index.js.flow +++ b/src/fp/subWeeksWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subYears/index.js.flow b/src/fp/subYears/index.js.flow index c27a11dbf1..5b0fa88cd0 100644 --- a/src/fp/subYears/index.js.flow +++ b/src/fp/subYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/subYearsWithOptions/index.js.flow b/src/fp/subYearsWithOptions/index.js.flow index 4637de377c..ac4be4541f 100644 --- a/src/fp/subYearsWithOptions/index.js.flow +++ b/src/fp/subYearsWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/toDate/index.js.flow b/src/fp/toDate/index.js.flow index bab69ddbde..f711744903 100644 --- a/src/fp/toDate/index.js.flow +++ b/src/fp/toDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/fp/toDateWithOptions/index.js.flow b/src/fp/toDateWithOptions/index.js.flow index b706c34bb2..ace7fcf174 100644 --- a/src/fp/toDateWithOptions/index.js.flow +++ b/src/fp/toDateWithOptions/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getDate/index.js b/src/getDate/index.js index 18d6a08a27..6820318d7d 100644 --- a/src/getDate/index.js +++ b/src/getDate/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getDate(new Date(2012, 1, 29)) * //=> 29 */ -export default function getDate (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getDate (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var dayOfMonth = date.getDate() return dayOfMonth } diff --git a/src/getDate/index.js.flow b/src/getDate/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getDate/index.js.flow +++ b/src/getDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getDay/index.js b/src/getDay/index.js index 89cef11e28..b0ff7e87f8 100644 --- a/src/getDay/index.js +++ b/src/getDay/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getDay(new Date(2012, 1, 29)) * //=> 3 */ -export default function getDay (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getDay (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var day = date.getDay() return day } diff --git a/src/getDay/index.js.flow b/src/getDay/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getDay/index.js.flow +++ b/src/getDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getDayOfYear/index.js b/src/getDayOfYear/index.js index a16d7bc763..4e9c47882b 100644 --- a/src/getDayOfYear/index.js +++ b/src/getDayOfYear/index.js @@ -19,9 +19,9 @@ import differenceInCalendarDays from '../differenceInCalendarDays/index.js' * var result = getDayOfYear(new Date(2014, 6, 2)) * //=> 183 */ -export default function getDayOfYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) - var diff = differenceInCalendarDays(startOfYear(date, options), date, options) +export default function getDayOfYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var diff = differenceInCalendarDays(startOfYear(date, dirtyOptions), date, dirtyOptions) var dayOfYear = diff + 1 return dayOfYear } diff --git a/src/getDayOfYear/index.js.flow b/src/getDayOfYear/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getDayOfYear/index.js.flow +++ b/src/getDayOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getDaysInMonth/index.js b/src/getDaysInMonth/index.js index 8378fe818d..6971c27c69 100644 --- a/src/getDaysInMonth/index.js +++ b/src/getDaysInMonth/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getDaysInMonth(new Date(2000, 1)) * //=> 29 */ -export default function getDaysInMonth (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getDaysInMonth (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getFullYear() var monthIndex = date.getMonth() var lastDayOfMonth = new Date(0) diff --git a/src/getDaysInMonth/index.js.flow b/src/getDaysInMonth/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getDaysInMonth/index.js.flow +++ b/src/getDaysInMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getDaysInYear/index.js b/src/getDaysInYear/index.js index 6a0e5513b3..e51d1afdeb 100644 --- a/src/getDaysInYear/index.js +++ b/src/getDaysInYear/index.js @@ -17,6 +17,6 @@ import isLeapYear from '../isLeapYear/index.js' * var result = getDaysInYear(new Date(2012, 0, 1)) * //=> 366 */ -export default function getDaysInYear (dirtyDate, options) { - return isLeapYear(dirtyDate, options) ? 366 : 365 +export default function getDaysInYear (dirtyDate, dirtyOptions) { + return isLeapYear(dirtyDate, dirtyOptions) ? 366 : 365 } diff --git a/src/getDaysInYear/index.js.flow b/src/getDaysInYear/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getDaysInYear/index.js.flow +++ b/src/getDaysInYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getHours/index.js b/src/getHours/index.js index 246a824fa0..7fdfc2bf36 100644 --- a/src/getHours/index.js +++ b/src/getHours/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getHours(new Date(2012, 1, 29, 11, 45)) * //=> 11 */ -export default function getHours (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getHours (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var hours = date.getHours() return hours } diff --git a/src/getHours/index.js.flow b/src/getHours/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getHours/index.js.flow +++ b/src/getHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getISODay/index.js b/src/getISODay/index.js index a3da83c46c..bd6cfab04a 100644 --- a/src/getISODay/index.js +++ b/src/getISODay/index.js @@ -20,8 +20,8 @@ import toDate from '../toDate/index.js' * var result = getISODay(new Date(2012, 1, 26)) * //=> 7 */ -export default function getISODay (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getISODay (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var day = date.getDay() if (day === 0) { diff --git a/src/getISODay/index.js.flow b/src/getISODay/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getISODay/index.js.flow +++ b/src/getISODay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getISOWeek/index.js b/src/getISOWeek/index.js index 28cc6adfd5..c94cad1bec 100644 --- a/src/getISOWeek/index.js +++ b/src/getISOWeek/index.js @@ -23,9 +23,9 @@ var MILLISECONDS_IN_WEEK = 604800000 * var result = getISOWeek(new Date(2005, 0, 2)) * //=> 53 */ -export default function getISOWeek (dirtyDate, options) { - var date = toDate(dirtyDate, options) - var diff = startOfISOWeek(date, options).getTime() - startOfISOYear(date, options).getTime() +export default function getISOWeek (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var diff = startOfISOWeek(date, dirtyOptions).getTime() - startOfISOYear(date, dirtyOptions).getTime() // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant diff --git a/src/getISOWeek/index.js.flow b/src/getISOWeek/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getISOWeek/index.js.flow +++ b/src/getISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getISOWeeksInYear/index.js b/src/getISOWeeksInYear/index.js index 1d60de6aee..9c5a608888 100644 --- a/src/getISOWeeksInYear/index.js +++ b/src/getISOWeeksInYear/index.js @@ -22,9 +22,9 @@ var MILLISECONDS_IN_WEEK = 604800000 * var result = getISOWeeksInYear(new Date(2015, 1, 11)) * //=> 53 */ -export default function getISOWeeksInYear (dirtyDate, options) { - var thisYear = startOfISOYear(dirtyDate, options) - var nextYear = startOfISOYear(addWeeks(thisYear, 60, options), options) +export default function getISOWeeksInYear (dirtyDate, dirtyOptions) { + var thisYear = startOfISOYear(dirtyDate, dirtyOptions) + var nextYear = startOfISOYear(addWeeks(thisYear, 60, dirtyOptions), dirtyOptions) var diff = nextYear.valueOf() - thisYear.valueOf() // Round the number of weeks to the nearest integer // because the number of milliseconds in a week is not constant diff --git a/src/getISOWeeksInYear/index.js.flow b/src/getISOWeeksInYear/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getISOWeeksInYear/index.js.flow +++ b/src/getISOWeeksInYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getISOYear/index.js b/src/getISOYear/index.js index 2d1c921490..9c05063fbc 100644 --- a/src/getISOYear/index.js +++ b/src/getISOYear/index.js @@ -21,19 +21,19 @@ import startOfISOWeek from '../startOfISOWeek/index.js' * var result = getISOYear(new Date(2005, 0, 2)) * //=> 2004 */ -export default function getISOYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getISOYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getFullYear() var fourthOfJanuaryOfNextYear = new Date(0) fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4) fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0) - var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear, options) + var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear, dirtyOptions) var fourthOfJanuaryOfThisYear = new Date(0) fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4) fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0) - var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear, options) + var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear, dirtyOptions) if (date.getTime() >= startOfNextYear.getTime()) { return year + 1 diff --git a/src/getISOYear/index.js.flow b/src/getISOYear/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getISOYear/index.js.flow +++ b/src/getISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getMilliseconds/index.js b/src/getMilliseconds/index.js index 03fa0298f9..ba55bafaaf 100644 --- a/src/getMilliseconds/index.js +++ b/src/getMilliseconds/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123)) * //=> 123 */ -export default function getMilliseconds (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getMilliseconds (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var milliseconds = date.getMilliseconds() return milliseconds } diff --git a/src/getMilliseconds/index.js.flow b/src/getMilliseconds/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getMilliseconds/index.js.flow +++ b/src/getMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getMinutes/index.js b/src/getMinutes/index.js index 810cf76180..2fd009ef57 100644 --- a/src/getMinutes/index.js +++ b/src/getMinutes/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getMinutes(new Date(2012, 1, 29, 11, 45, 5)) * //=> 45 */ -export default function getMinutes (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getMinutes (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var minutes = date.getMinutes() return minutes } diff --git a/src/getMinutes/index.js.flow b/src/getMinutes/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getMinutes/index.js.flow +++ b/src/getMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getMonth/index.js b/src/getMonth/index.js index 96c9ca3749..d1b7ae982e 100644 --- a/src/getMonth/index.js +++ b/src/getMonth/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getMonth(new Date(2012, 1, 29)) * //=> 1 */ -export default function getMonth (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getMonth (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var month = date.getMonth() return month } diff --git a/src/getMonth/index.js.flow b/src/getMonth/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getMonth/index.js.flow +++ b/src/getMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getOverlappingDaysInIntervals/index.js b/src/getOverlappingDaysInIntervals/index.js index 8fcc990d23..54f5fca62e 100644 --- a/src/getOverlappingDaysInIntervals/index.js +++ b/src/getOverlappingDaysInIntervals/index.js @@ -32,11 +32,11 @@ var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000 * ) * //=> 0 */ -export default function getOverlappingDaysInIntervals (dirtyIntervalLeft, dirtyIntervalRight, options) { - var leftStartTime = toDate(dirtyIntervalLeft.start, options).getTime() - var leftEndTime = toDate(dirtyIntervalLeft.end, options).getTime() - var rightStartTime = toDate(dirtyIntervalRight.start, options).getTime() - var rightEndTime = toDate(dirtyIntervalRight.end, options).getTime() +export default function getOverlappingDaysInIntervals (dirtyIntervalLeft, dirtyIntervalRight, dirtyOptions) { + var leftStartTime = toDate(dirtyIntervalLeft.start, dirtyOptions).getTime() + var leftEndTime = toDate(dirtyIntervalLeft.end, dirtyOptions).getTime() + var rightStartTime = toDate(dirtyIntervalRight.start, dirtyOptions).getTime() + var rightEndTime = toDate(dirtyIntervalRight.end, dirtyOptions).getTime() if (leftStartTime > leftEndTime || rightStartTime > rightEndTime) { throw new Error('The start of an interval cannot be after its end') diff --git a/src/getOverlappingDaysInIntervals/index.js.flow b/src/getOverlappingDaysInIntervals/index.js.flow index 17ef10fdf8..732964f889 100644 --- a/src/getOverlappingDaysInIntervals/index.js.flow +++ b/src/getOverlappingDaysInIntervals/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getQuarter/index.js b/src/getQuarter/index.js index 44b9276e90..1d321cc462 100644 --- a/src/getQuarter/index.js +++ b/src/getQuarter/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getQuarter(new Date(2014, 6, 2)) * //=> 3 */ -export default function getQuarter (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getQuarter (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var quarter = Math.floor(date.getMonth() / 3) + 1 return quarter } diff --git a/src/getQuarter/index.js.flow b/src/getQuarter/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getQuarter/index.js.flow +++ b/src/getQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getSeconds/index.js b/src/getSeconds/index.js index fb7a96db2f..d6ee3c9518 100644 --- a/src/getSeconds/index.js +++ b/src/getSeconds/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123)) * //=> 5 */ -export default function getSeconds (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getSeconds (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var seconds = date.getSeconds() return seconds } diff --git a/src/getSeconds/index.js.flow b/src/getSeconds/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getSeconds/index.js.flow +++ b/src/getSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getTime/index.js b/src/getTime/index.js index 7c2278b217..bd3a528ebe 100644 --- a/src/getTime/index.js +++ b/src/getTime/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123)) * //=> 1330515905123 */ -export default function getTime (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getTime (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var timestamp = date.getTime() return timestamp } diff --git a/src/getTime/index.js.flow b/src/getTime/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getTime/index.js.flow +++ b/src/getTime/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/getYear/index.js b/src/getYear/index.js index beb6104c48..0c4ca1f0fb 100644 --- a/src/getYear/index.js +++ b/src/getYear/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = getYear(new Date(2014, 6, 2)) * //=> 2014 */ -export default function getYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getFullYear() return year } diff --git a/src/getYear/index.js.flow b/src/getYear/index.js.flow index 8ee006c2ed..1e6055bbd0 100644 --- a/src/getYear/index.js.flow +++ b/src/getYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isAfter/index.js b/src/isAfter/index.js index a46586c212..8a88d9a389 100644 --- a/src/isAfter/index.js +++ b/src/isAfter/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11)) * //=> true */ -export default function isAfter (dirtyDate, dirtyDateToCompare, options) { - var date = toDate(dirtyDate, options) - var dateToCompare = toDate(dirtyDateToCompare, options) +export default function isAfter (dirtyDate, dirtyDateToCompare, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var dateToCompare = toDate(dirtyDateToCompare, dirtyOptions) return date.getTime() > dateToCompare.getTime() } diff --git a/src/isAfter/index.js.flow b/src/isAfter/index.js.flow index d74282172b..6ce51ba082 100644 --- a/src/isAfter/index.js.flow +++ b/src/isAfter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isBefore/index.js b/src/isBefore/index.js index 352d7b4366..dea9ccc153 100644 --- a/src/isBefore/index.js +++ b/src/isBefore/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11)) * //=> false */ -export default function isBefore (dirtyDate, dirtyDateToCompare, options) { - var date = toDate(dirtyDate, options) - var dateToCompare = toDate(dirtyDateToCompare, options) +export default function isBefore (dirtyDate, dirtyDateToCompare, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var dateToCompare = toDate(dirtyDateToCompare, dirtyOptions) return date.getTime() < dateToCompare.getTime() } diff --git a/src/isBefore/index.js.flow b/src/isBefore/index.js.flow index d74282172b..6ce51ba082 100644 --- a/src/isBefore/index.js.flow +++ b/src/isBefore/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isDate/index.js.flow b/src/isDate/index.js.flow index 5b9b6a38fa..311e530527 100644 --- a/src/isDate/index.js.flow +++ b/src/isDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isEqual/index.js b/src/isEqual/index.js index 2157924174..003c311bcd 100644 --- a/src/isEqual/index.js +++ b/src/isEqual/index.js @@ -21,8 +21,8 @@ import toDate from '../toDate/index.js' * ) * //=> false */ -export default function isEqual (dirtyLeftDate, dirtyRightDate, options) { - var dateLeft = toDate(dirtyLeftDate, options) - var dateRight = toDate(dirtyRightDate, options) +export default function isEqual (dirtyLeftDate, dirtyRightDate, dirtyOptions) { + var dateLeft = toDate(dirtyLeftDate, dirtyOptions) + var dateRight = toDate(dirtyRightDate, dirtyOptions) return dateLeft.getTime() === dateRight.getTime() } diff --git a/src/isEqual/index.js.flow b/src/isEqual/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isEqual/index.js.flow +++ b/src/isEqual/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isFirstDayOfMonth/index.js b/src/isFirstDayOfMonth/index.js index d50c9391e8..4ce13575fb 100644 --- a/src/isFirstDayOfMonth/index.js +++ b/src/isFirstDayOfMonth/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isFirstDayOfMonth(new Date(2014, 8, 1)) * //=> true */ -export default function isFirstDayOfMonth (dirtyDate, options) { - return toDate(dirtyDate, options).getDate() === 1 +export default function isFirstDayOfMonth (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDate() === 1 } diff --git a/src/isFirstDayOfMonth/index.js.flow b/src/isFirstDayOfMonth/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isFirstDayOfMonth/index.js.flow +++ b/src/isFirstDayOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isFriday/index.js b/src/isFriday/index.js index f44e75db7b..eacbbb6972 100644 --- a/src/isFriday/index.js +++ b/src/isFriday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isFriday(new Date(2014, 8, 26)) * //=> true */ -export default function isFriday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 5 +export default function isFriday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 5 } diff --git a/src/isFriday/index.js.flow b/src/isFriday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isFriday/index.js.flow +++ b/src/isFriday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isLastDayOfMonth/index.js b/src/isLastDayOfMonth/index.js index 80dc1f1e04..9d2ef3c0b8 100644 --- a/src/isLastDayOfMonth/index.js +++ b/src/isLastDayOfMonth/index.js @@ -19,7 +19,7 @@ import endOfMonth from '../endOfMonth/index.js' * var result = isLastDayOfMonth(new Date(2014, 1, 28)) * //=> true */ -export default function isLastDayOfMonth (dirtyDate, options) { - var date = toDate(dirtyDate, options) - return endOfDay(date, options).getTime() === endOfMonth(date, options).getTime() +export default function isLastDayOfMonth (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + return endOfDay(date, dirtyOptions).getTime() === endOfMonth(date, dirtyOptions).getTime() } diff --git a/src/isLastDayOfMonth/index.js.flow b/src/isLastDayOfMonth/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isLastDayOfMonth/index.js.flow +++ b/src/isLastDayOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isLeapYear/index.js b/src/isLeapYear/index.js index cac62bd576..1c16da74ae 100644 --- a/src/isLeapYear/index.js +++ b/src/isLeapYear/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = isLeapYear(new Date(2012, 8, 1)) * //=> true */ -export default function isLeapYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function isLeapYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getFullYear() return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0 } diff --git a/src/isLeapYear/index.js.flow b/src/isLeapYear/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isLeapYear/index.js.flow +++ b/src/isLeapYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isMonday/index.js b/src/isMonday/index.js index 8ec1c5fb93..6e511fd252 100644 --- a/src/isMonday/index.js +++ b/src/isMonday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isMonday(new Date(2014, 8, 22)) * //=> true */ -export default function isMonday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 1 +export default function isMonday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 1 } diff --git a/src/isMonday/index.js.flow b/src/isMonday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isMonday/index.js.flow +++ b/src/isMonday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameDay/index.js b/src/isSameDay/index.js index 6ec1fdabb6..37c4e2b177 100644 --- a/src/isSameDay/index.js +++ b/src/isSameDay/index.js @@ -21,9 +21,9 @@ import startOfDay from '../startOfDay/index.js' * ) * //=> true */ -export default function isSameDay (dirtyDateLeft, dirtyDateRight, options) { - var dateLeftStartOfDay = startOfDay(dirtyDateLeft, options) - var dateRightStartOfDay = startOfDay(dirtyDateRight, options) +export default function isSameDay (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeftStartOfDay = startOfDay(dirtyDateLeft, dirtyOptions) + var dateRightStartOfDay = startOfDay(dirtyDateRight, dirtyOptions) return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime() } diff --git a/src/isSameDay/index.js.flow b/src/isSameDay/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameDay/index.js.flow +++ b/src/isSameDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameHour/index.js b/src/isSameHour/index.js index 573ba4b863..39c832383a 100644 --- a/src/isSameHour/index.js +++ b/src/isSameHour/index.js @@ -21,9 +21,9 @@ import startOfHour from '../startOfHour/index.js' * ) * //=> true */ -export default function isSameHour (dirtyDateLeft, dirtyDateRight, options) { - var dateLeftStartOfHour = startOfHour(dirtyDateLeft, options) - var dateRightStartOfHour = startOfHour(dirtyDateRight, options) +export default function isSameHour (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeftStartOfHour = startOfHour(dirtyDateLeft, dirtyOptions) + var dateRightStartOfHour = startOfHour(dirtyDateRight, dirtyOptions) return dateLeftStartOfHour.getTime() === dateRightStartOfHour.getTime() } diff --git a/src/isSameHour/index.js.flow b/src/isSameHour/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameHour/index.js.flow +++ b/src/isSameHour/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameISOWeek/index.js b/src/isSameISOWeek/index.js index 9159b744be..d14cb5cfde 100644 --- a/src/isSameISOWeek/index.js +++ b/src/isSameISOWeek/index.js @@ -24,8 +24,8 @@ import cloneObject from '../_lib/cloneObject/index.js' * ) * //=> true */ -export default function isSameISOWeek (dirtyDateLeft, dirtyDateRight, options) { - var isSameWeekOptions = cloneObject(options) +export default function isSameISOWeek (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var isSameWeekOptions = cloneObject(dirtyOptions) isSameWeekOptions.weekStartsOn = 1 return isSameWeek(dirtyDateLeft, dirtyDateRight, isSameWeekOptions) } diff --git a/src/isSameISOWeek/index.js.flow b/src/isSameISOWeek/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameISOWeek/index.js.flow +++ b/src/isSameISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameISOYear/index.js b/src/isSameISOYear/index.js index 3dce167a61..ea41865b56 100644 --- a/src/isSameISOYear/index.js +++ b/src/isSameISOYear/index.js @@ -23,9 +23,9 @@ import startOfISOYear from '../startOfISOYear/index.js' * ) * //=> true */ -export default function isSameISOYear (dirtyDateLeft, dirtyDateRight, options) { - var dateLeftStartOfYear = startOfISOYear(dirtyDateLeft, options) - var dateRightStartOfYear = startOfISOYear(dirtyDateRight, options) +export default function isSameISOYear (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeftStartOfYear = startOfISOYear(dirtyDateLeft, dirtyOptions) + var dateRightStartOfYear = startOfISOYear(dirtyDateRight, dirtyOptions) return dateLeftStartOfYear.getTime() === dateRightStartOfYear.getTime() } diff --git a/src/isSameISOYear/index.js.flow b/src/isSameISOYear/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameISOYear/index.js.flow +++ b/src/isSameISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameMinute/index.js b/src/isSameMinute/index.js index 5ba7dfb25c..456ccf4bcd 100644 --- a/src/isSameMinute/index.js +++ b/src/isSameMinute/index.js @@ -22,9 +22,9 @@ import startOfMinute from '../startOfMinute/index.js' * ) * //=> true */ -export default function isSameMinute (dirtyDateLeft, dirtyDateRight, options) { - var dateLeftStartOfMinute = startOfMinute(dirtyDateLeft, options) - var dateRightStartOfMinute = startOfMinute(dirtyDateRight, options) +export default function isSameMinute (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeftStartOfMinute = startOfMinute(dirtyDateLeft, dirtyOptions) + var dateRightStartOfMinute = startOfMinute(dirtyDateRight, dirtyOptions) return dateLeftStartOfMinute.getTime() === dateRightStartOfMinute.getTime() } diff --git a/src/isSameMinute/index.js.flow b/src/isSameMinute/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameMinute/index.js.flow +++ b/src/isSameMinute/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameMonth/index.js b/src/isSameMonth/index.js index 8abf2bc057..2d80a623f9 100644 --- a/src/isSameMonth/index.js +++ b/src/isSameMonth/index.js @@ -21,9 +21,9 @@ import toDate from '../toDate/index.js' * ) * //=> true */ -export default function isSameMonth (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function isSameMonth (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth() } diff --git a/src/isSameMonth/index.js.flow b/src/isSameMonth/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameMonth/index.js.flow +++ b/src/isSameMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameQuarter/index.js b/src/isSameQuarter/index.js index 815e4dd8c9..8dfe6d8789 100644 --- a/src/isSameQuarter/index.js +++ b/src/isSameQuarter/index.js @@ -21,9 +21,9 @@ import startOfQuarter from '../startOfQuarter/index.js' * ) * //=> true */ -export default function isSameQuarter (dirtyDateLeft, dirtyDateRight, options) { - var dateLeftStartOfQuarter = startOfQuarter(dirtyDateLeft, options) - var dateRightStartOfQuarter = startOfQuarter(dirtyDateRight, options) +export default function isSameQuarter (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeftStartOfQuarter = startOfQuarter(dirtyDateLeft, dirtyOptions) + var dateRightStartOfQuarter = startOfQuarter(dirtyDateRight, dirtyOptions) return dateLeftStartOfQuarter.getTime() === dateRightStartOfQuarter.getTime() } diff --git a/src/isSameQuarter/index.js.flow b/src/isSameQuarter/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameQuarter/index.js.flow +++ b/src/isSameQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameSecond/index.js b/src/isSameSecond/index.js index ab4668607b..5bd4d4cd7b 100644 --- a/src/isSameSecond/index.js +++ b/src/isSameSecond/index.js @@ -22,9 +22,9 @@ import startOfSecond from '../startOfSecond/index.js' * ) * //=> true */ -export default function isSameSecond (dirtyDateLeft, dirtyDateRight, options) { - var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft, options) - var dateRightStartOfSecond = startOfSecond(dirtyDateRight, options) +export default function isSameSecond (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft, dirtyOptions) + var dateRightStartOfSecond = startOfSecond(dirtyDateRight, dirtyOptions) return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime() } diff --git a/src/isSameSecond/index.js.flow b/src/isSameSecond/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameSecond/index.js.flow +++ b/src/isSameSecond/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameWeek/index.js.flow b/src/isSameWeek/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameWeek/index.js.flow +++ b/src/isSameWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSameYear/index.js b/src/isSameYear/index.js index 714368ea2d..ed49e22606 100644 --- a/src/isSameYear/index.js +++ b/src/isSameYear/index.js @@ -21,8 +21,8 @@ import toDate from '../toDate/index.js' * ) * //=> true */ -export default function isSameYear (dirtyDateLeft, dirtyDateRight, options) { - var dateLeft = toDate(dirtyDateLeft, options) - var dateRight = toDate(dirtyDateRight, options) +export default function isSameYear (dirtyDateLeft, dirtyDateRight, dirtyOptions) { + var dateLeft = toDate(dirtyDateLeft, dirtyOptions) + var dateRight = toDate(dirtyDateRight, dirtyOptions) return dateLeft.getFullYear() === dateRight.getFullYear() } diff --git a/src/isSameYear/index.js.flow b/src/isSameYear/index.js.flow index 11fc4bbebe..f84117193e 100644 --- a/src/isSameYear/index.js.flow +++ b/src/isSameYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSaturday/index.js b/src/isSaturday/index.js index 526ec2860f..6dba460828 100644 --- a/src/isSaturday/index.js +++ b/src/isSaturday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isSaturday(new Date(2014, 8, 27)) * //=> true */ -export default function isSaturday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 6 +export default function isSaturday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 6 } diff --git a/src/isSaturday/index.js.flow b/src/isSaturday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isSaturday/index.js.flow +++ b/src/isSaturday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isSunday/index.js b/src/isSunday/index.js index db06c24380..cb1afe72a4 100644 --- a/src/isSunday/index.js +++ b/src/isSunday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isSunday(new Date(2014, 8, 21)) * //=> true */ -export default function isSunday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 0 +export default function isSunday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 0 } diff --git a/src/isSunday/index.js.flow b/src/isSunday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isSunday/index.js.flow +++ b/src/isSunday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isThursday/index.js b/src/isThursday/index.js index 58e1dbd85c..d3d4b79f7d 100644 --- a/src/isThursday/index.js +++ b/src/isThursday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isThursday(new Date(2014, 8, 25)) * //=> true */ -export default function isThursday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 4 +export default function isThursday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 4 } diff --git a/src/isThursday/index.js.flow b/src/isThursday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isThursday/index.js.flow +++ b/src/isThursday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isTuesday/index.js b/src/isTuesday/index.js index dd81ccb481..bb6d5a9d0e 100644 --- a/src/isTuesday/index.js +++ b/src/isTuesday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isTuesday(new Date(2014, 8, 23)) * //=> true */ -export default function isTuesday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 2 +export default function isTuesday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 2 } diff --git a/src/isTuesday/index.js.flow b/src/isTuesday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isTuesday/index.js.flow +++ b/src/isTuesday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isValid/index.js.flow b/src/isValid/index.js.flow index a6f9765630..384305e112 100644 --- a/src/isValid/index.js.flow +++ b/src/isValid/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isWednesday/index.js b/src/isWednesday/index.js index cf79900d48..86fdc47de5 100644 --- a/src/isWednesday/index.js +++ b/src/isWednesday/index.js @@ -17,6 +17,6 @@ import toDate from '../toDate/index.js' * var result = isWednesday(new Date(2014, 8, 24)) * //=> true */ -export default function isWednesday (dirtyDate, options) { - return toDate(dirtyDate, options).getDay() === 3 +export default function isWednesday (dirtyDate, dirtyOptions) { + return toDate(dirtyDate, dirtyOptions).getDay() === 3 } diff --git a/src/isWednesday/index.js.flow b/src/isWednesday/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isWednesday/index.js.flow +++ b/src/isWednesday/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isWeekend/index.js b/src/isWeekend/index.js index 9092a1159b..3d94251e3a 100644 --- a/src/isWeekend/index.js +++ b/src/isWeekend/index.js @@ -17,8 +17,8 @@ import toDate from '../toDate/index.js' * var result = isWeekend(new Date(2014, 9, 5)) * //=> true */ -export default function isWeekend (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function isWeekend (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var day = date.getDay() return day === 0 || day === 6 } diff --git a/src/isWeekend/index.js.flow b/src/isWeekend/index.js.flow index 90eaa63572..eab32cc1d6 100644 --- a/src/isWeekend/index.js.flow +++ b/src/isWeekend/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/isWithinInterval/index.js b/src/isWithinInterval/index.js index ea79b011d3..1c812d8a35 100644 --- a/src/isWithinInterval/index.js +++ b/src/isWithinInterval/index.js @@ -30,10 +30,10 @@ import toDate from '../toDate/index.js' * ) * //=> false */ -export default function isWithinInterval (dirtyDate, dirtyInterval, options) { - var time = toDate(dirtyDate, options).getTime() - var startTime = toDate(dirtyInterval.start, options).getTime() - var endTime = toDate(dirtyInterval.end, options).getTime() +export default function isWithinInterval (dirtyDate, dirtyInterval, dirtyOptions) { + var time = toDate(dirtyDate, dirtyOptions).getTime() + var startTime = toDate(dirtyInterval.start, dirtyOptions).getTime() + var endTime = toDate(dirtyInterval.end, dirtyOptions).getTime() if (startTime > endTime) { throw new Error('The start of an interval cannot be after its end') diff --git a/src/isWithinInterval/index.js.flow b/src/isWithinInterval/index.js.flow index 828ce8d64d..01ebc4aaa6 100644 --- a/src/isWithinInterval/index.js.flow +++ b/src/isWithinInterval/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/lastDayOfISOWeek/index.js b/src/lastDayOfISOWeek/index.js index 4b19e6a2fe..1ff5f10979 100644 --- a/src/lastDayOfISOWeek/index.js +++ b/src/lastDayOfISOWeek/index.js @@ -21,8 +21,8 @@ import cloneObject from '../_lib/cloneObject/index.js' * var result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Sun Sep 07 2014 00:00:00 */ -export default function lastDayOfISOWeek (dirtyDate, options) { - var lastDayOfWeekOptions = cloneObject(options) +export default function lastDayOfISOWeek (dirtyDate, dirtyOptions) { + var lastDayOfWeekOptions = cloneObject(dirtyOptions) lastDayOfWeekOptions.weekStartsOn = 1 return lastDayOfWeek(dirtyDate, lastDayOfWeekOptions) } diff --git a/src/lastDayOfISOWeek/index.js.flow b/src/lastDayOfISOWeek/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/lastDayOfISOWeek/index.js.flow +++ b/src/lastDayOfISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/lastDayOfISOYear/index.js b/src/lastDayOfISOYear/index.js index 67e7079bb2..a077a6c9cc 100644 --- a/src/lastDayOfISOYear/index.js +++ b/src/lastDayOfISOYear/index.js @@ -22,12 +22,12 @@ import startOfISOWeek from '../startOfISOWeek/index.js' * var result = lastDayOfISOYear(new Date(2005, 6, 2)) * //=> Sun Jan 01 2006 00:00:00 */ -export default function lastDayOfISOYear (dirtyDate, options) { - var year = getISOYear(dirtyDate, options) +export default function lastDayOfISOYear (dirtyDate, dirtyOptions) { + var year = getISOYear(dirtyDate, dirtyOptions) var fourthOfJanuary = new Date(0) fourthOfJanuary.setFullYear(year + 1, 0, 4) fourthOfJanuary.setHours(0, 0, 0, 0) - var date = startOfISOWeek(fourthOfJanuary, options) + var date = startOfISOWeek(fourthOfJanuary, dirtyOptions) date.setDate(date.getDate() - 1) return date } diff --git a/src/lastDayOfISOYear/index.js.flow b/src/lastDayOfISOYear/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/lastDayOfISOYear/index.js.flow +++ b/src/lastDayOfISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/lastDayOfMonth/index.js b/src/lastDayOfMonth/index.js index 8c6f778313..990c7a888c 100644 --- a/src/lastDayOfMonth/index.js +++ b/src/lastDayOfMonth/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 30 2014 00:00:00 */ -export default function lastDayOfMonth (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function lastDayOfMonth (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var month = date.getMonth() date.setFullYear(date.getFullYear(), month + 1, 0) date.setHours(0, 0, 0, 0) diff --git a/src/lastDayOfMonth/index.js.flow b/src/lastDayOfMonth/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/lastDayOfMonth/index.js.flow +++ b/src/lastDayOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/lastDayOfQuarter/index.js b/src/lastDayOfQuarter/index.js index 639d94dcd1..1a3e91c3c3 100644 --- a/src/lastDayOfQuarter/index.js +++ b/src/lastDayOfQuarter/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 30 2014 00:00:00 */ -export default function lastDayOfQuarter (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function lastDayOfQuarter (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var currentMonth = date.getMonth() var month = currentMonth - currentMonth % 3 + 3 date.setMonth(month, 0) diff --git a/src/lastDayOfQuarter/index.js.flow b/src/lastDayOfQuarter/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/lastDayOfQuarter/index.js.flow +++ b/src/lastDayOfQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/lastDayOfWeek/index.js.flow b/src/lastDayOfWeek/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/lastDayOfWeek/index.js.flow +++ b/src/lastDayOfWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/lastDayOfYear/index.js b/src/lastDayOfYear/index.js index d8afa8c800..7e4d20e828 100644 --- a/src/lastDayOfYear/index.js +++ b/src/lastDayOfYear/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00)) * //=> Wed Dec 31 2014 00:00:00 */ -export default function lastDayOfYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function lastDayOfYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getFullYear() date.setFullYear(year + 1, 0, 0) date.setHours(0, 0, 0, 0) diff --git a/src/lastDayOfYear/index.js.flow b/src/lastDayOfYear/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/lastDayOfYear/index.js.flow +++ b/src/lastDayOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/max/index.js b/src/max/index.js index dfef19e04e..3fad2b4cf1 100644 --- a/src/max/index.js +++ b/src/max/index.js @@ -24,9 +24,9 @@ import toDate from '../toDate/index.js' * ) * //=> Sun Jul 02 1995 00:00:00 */ -export default function max (datesArray, options) { +export default function max (datesArray, dirtyOptions) { var dates = datesArray.map(function (dirtyDate) { - return toDate(dirtyDate, options) + return toDate(dirtyDate, dirtyOptions) }) var latestTimestamp = Math.max.apply(null, dates) return new Date(latestTimestamp) diff --git a/src/max/index.js.flow b/src/max/index.js.flow index 9e7c5d4fa1..f2e7a16f9b 100644 --- a/src/max/index.js.flow +++ b/src/max/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/min/index.js b/src/min/index.js index ad39bea5d9..bafecb62c2 100644 --- a/src/min/index.js +++ b/src/min/index.js @@ -24,9 +24,9 @@ import toDate from '../toDate/index.js' * ) * //=> Wed Feb 11 1987 00:00:00 */ -export default function min (datesArray, options) { +export default function min (datesArray, dirtyOptions) { var dates = datesArray.map(function (dirtyDate) { - return toDate(dirtyDate, options) + return toDate(dirtyDate, dirtyOptions) }) var earliestTimestamp = Math.min.apply(null, dates) return new Date(earliestTimestamp) diff --git a/src/min/index.js.flow b/src/min/index.js.flow index 9e7c5d4fa1..f2e7a16f9b 100644 --- a/src/min/index.js.flow +++ b/src/min/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/parse/_lib/getUTCISOWeek/index.js b/src/parse/_lib/getUTCISOWeek/index.js index 2ba562ebd3..6aa42e3519 100644 --- a/src/parse/_lib/getUTCISOWeek/index.js +++ b/src/parse/_lib/getUTCISOWeek/index.js @@ -6,9 +6,9 @@ var MILLISECONDS_IN_WEEK = 604800000 // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function getUTCISOWeek (dirtyDate, options) { - var date = toDate(dirtyDate, options) - var diff = startOfUTCISOWeek(date, options).getTime() - startOfUTCISOYear(date, options).getTime() +export default function getUTCISOWeek (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var diff = startOfUTCISOWeek(date, dirtyOptions).getTime() - startOfUTCISOYear(date, dirtyOptions).getTime() // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant diff --git a/src/parse/_lib/getUTCISOWeek/test.js b/src/parse/_lib/getUTCISOWeek/test.js index 41bef6f77d..b777e7cee6 100644 --- a/src/parse/_lib/getUTCISOWeek/test.js +++ b/src/parse/_lib/getUTCISOWeek/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import getUTCISOWeek from '.' -describe('getUTCISOWeek', function () { +describe('parse > getUTCISOWeek', function () { it('returns the ISO week of the given date', function () { var result = getUTCISOWeek(new Date(Date.UTC(2005, 0 /* Jan */, 2))) assert(result === 53) diff --git a/src/parse/_lib/getUTCISOYear/index.js b/src/parse/_lib/getUTCISOYear/index.js index 42b422151d..15f1470a74 100644 --- a/src/parse/_lib/getUTCISOYear/index.js +++ b/src/parse/_lib/getUTCISOYear/index.js @@ -3,19 +3,19 @@ import startOfUTCISOWeek from '../startOfUTCISOWeek/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function getUTCISOYear (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function getUTCISOYear (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var year = date.getUTCFullYear() var fourthOfJanuaryOfNextYear = new Date(0) fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4) fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0) - var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear, options) + var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear, dirtyOptions) var fourthOfJanuaryOfThisYear = new Date(0) fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4) fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0) - var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear, options) + var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear, dirtyOptions) if (date.getTime() >= startOfNextYear.getTime()) { return year + 1 diff --git a/src/parse/_lib/getUTCISOYear/test.js b/src/parse/_lib/getUTCISOYear/test.js index ef341624c3..2a87787d97 100644 --- a/src/parse/_lib/getUTCISOYear/test.js +++ b/src/parse/_lib/getUTCISOYear/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import getUTCISOYear from '.' -describe('getUTCISOYear', function () { +describe('parse > getUTCISOYear', function () { it('returns the ISO week-numbering year of the given date', function () { var result = getUTCISOYear(new Date(Date.UTC(2007, 11 /* Dec */, 31))) assert(result === 2008) diff --git a/src/parse/_lib/setUTCDay/index.js b/src/parse/_lib/setUTCDay/index.js index 34dfd7bec4..c5d7f6cee1 100644 --- a/src/parse/_lib/setUTCDay/index.js +++ b/src/parse/_lib/setUTCDay/index.js @@ -2,9 +2,11 @@ import toDate from '../../../toDate/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function setUTCDay (dirtyDate, day, options) { - var weekStartsOn = options ? (options.weekStartsOn || 0) : 0 - var date = toDate(dirtyDate, options) +export default function setUTCDay (dirtyDate, dirtyDay, dirtyOptions) { + var weekStartsOn = dirtyOptions ? (dirtyOptions.weekStartsOn || 0) : 0 + var date = toDate(dirtyDate, dirtyOptions) + var day = Number(dirtyDay) + var currentDay = date.getUTCDay() var remainder = day % 7 diff --git a/src/parse/_lib/setUTCDay/test.js b/src/parse/_lib/setUTCDay/test.js index 2106feb255..3ded573447 100644 --- a/src/parse/_lib/setUTCDay/test.js +++ b/src/parse/_lib/setUTCDay/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import setUTCDay from '.' -describe('setUTCDay', function () { +describe('parse > setUTCDay', function () { it('sets the day of the week', function () { var result = setUTCDay(new Date(Date.UTC(2014, 8 /* Sep */, 1)), 0) assert.deepEqual(result, new Date(Date.UTC(2014, 7 /* Aug */, 31))) @@ -59,6 +59,16 @@ describe('setUTCDay', function () { assert.deepEqual(result, new Date(Date.UTC(2014, 8 /* Sep */, 3))) }) + it('implicitly converts number arguments', function () { + var result = setUTCDay(new Date(Date.UTC(2014, 8 /* Sep */, 1)), '0') + assert.deepEqual(result, new Date(Date.UTC(2014, 7 /* Aug */, 31))) + }) + + it('implicitly converts options', function () { + var result = setUTCDay(new Date(Date.UTC(2014, 8 /* Sep */, 1)), 0, {weekStartsOn: '1'}) + assert.deepEqual(result, new Date(Date.UTC(2014, 8 /* Sep */, 7))) + }) + it('does not mutate the original date', function () { var date = new Date(Date.UTC(2014, 8 /* Sep */, 1)) setUTCDay(date, 3) diff --git a/src/parse/_lib/setUTCISODay/index.js b/src/parse/_lib/setUTCISODay/index.js index 462a2023d6..8609fcc1cc 100644 --- a/src/parse/_lib/setUTCISODay/index.js +++ b/src/parse/_lib/setUTCISODay/index.js @@ -2,13 +2,15 @@ import toDate from '../../../toDate/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function setUTCISODay (dirtyDate, day, options) { +export default function setUTCISODay (dirtyDate, dirtyDay, dirtyOptions) { + var day = Number(dirtyDay) + if (day % 7 === 0) { day = day - 7 } var weekStartsOn = 1 - var date = toDate(dirtyDate, options) + var date = toDate(dirtyDate, dirtyOptions) var currentDay = date.getUTCDay() var remainder = day % 7 diff --git a/src/parse/_lib/setUTCISODay/test.js b/src/parse/_lib/setUTCISODay/test.js index c882dc8208..817f06a49c 100644 --- a/src/parse/_lib/setUTCISODay/test.js +++ b/src/parse/_lib/setUTCISODay/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import setUTCISODay from '.' -describe('setUTCISODay', function () { +describe('parse > setUTCISODay', function () { it('sets the day of the ISO week', function () { var result = setUTCISODay(new Date(Date.UTC(2014, 8 /* Sep */, 1)), 3) assert.deepEqual(result, new Date(Date.UTC(2014, 8 /* Sep */, 3))) @@ -49,6 +49,11 @@ describe('setUTCISODay', function () { assert.deepEqual(result, new Date(Date.UTC(2014, 8 /* Sep */, 3))) }) + it('implicitly converts number arguments', function () { + var result = setUTCISODay(new Date(Date.UTC(2014, 8 /* Sep */, 1)), '3') + assert.deepEqual(result, new Date(Date.UTC(2014, 8 /* Sep */, 3))) + }) + it('does not mutate the original date', function () { var date = new Date(Date.UTC(2014, 8 /* Sep */, 1)) setUTCISODay(date, 3) diff --git a/src/parse/_lib/setUTCISOWeek/index.js b/src/parse/_lib/setUTCISOWeek/index.js index 04f41927a0..ca50e3d0ad 100644 --- a/src/parse/_lib/setUTCISOWeek/index.js +++ b/src/parse/_lib/setUTCISOWeek/index.js @@ -3,9 +3,10 @@ import getUTCISOWeek from '../getUTCISOWeek/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function setUTCISOWeek (dirtyDate, isoWeek, options) { - var date = toDate(dirtyDate, options) - var diff = getUTCISOWeek(date, options) - isoWeek +export default function setUTCISOWeek (dirtyDate, dirtyISOWeek, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var isoWeek = Number(dirtyISOWeek) + var diff = getUTCISOWeek(date, dirtyOptions) - isoWeek date.setUTCDate(date.getUTCDate() - diff * 7) return date } diff --git a/src/parse/_lib/setUTCISOWeek/test.js b/src/parse/_lib/setUTCISOWeek/test.js index 0a4875177b..150666ef10 100644 --- a/src/parse/_lib/setUTCISOWeek/test.js +++ b/src/parse/_lib/setUTCISOWeek/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import setUTCISOWeek from '.' -describe('setUTCISOWeek', function () { +describe('parse > setUTCISOWeek', function () { it('sets the ISO week', function () { var result = setUTCISOWeek(new Date(Date.UTC(2004, 7 /* Aug */, 7)), 53) assert.deepEqual(result, new Date(Date.UTC(2005, 0 /* Jan */, 1))) @@ -20,6 +20,11 @@ describe('setUTCISOWeek', function () { assert.deepEqual(result, new Date(Date.UTC(2008, 11 /* Dec */, 31))) }) + it('implicitly converts number arguments', function () { + var result = setUTCISOWeek(new Date(Date.UTC(2004, 7 /* Aug */, 7)), '53') + assert.deepEqual(result, new Date(Date.UTC(2005, 0 /* Jan */, 1))) + }) + it('does not mutate the original date', function () { var date = new Date(Date.UTC(2014, 6 /* Jul */, 2)) setUTCISOWeek(date, 52) diff --git a/src/parse/_lib/setUTCISOYear/index.js b/src/parse/_lib/setUTCISOYear/index.js index 4a242544b0..c4a1188ac6 100644 --- a/src/parse/_lib/setUTCISOYear/index.js +++ b/src/parse/_lib/setUTCISOYear/index.js @@ -5,14 +5,15 @@ var MILLISECONDS_IN_DAY = 86400000 // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function setISOYear (dirtyDate, isoYear, options) { - var date = toDate(dirtyDate, options) - var dateStartOfYear = startOfUTCISOYear(date, options) +export default function setISOYear (dirtyDate, dirtyISOYear, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) + var isoYear = Number(dirtyISOYear) + var dateStartOfYear = startOfUTCISOYear(date, dirtyOptions) var diff = Math.floor((date.getTime() - dateStartOfYear.getTime()) / MILLISECONDS_IN_DAY) var fourthOfJanuary = new Date(0) fourthOfJanuary.setUTCFullYear(isoYear, 0, 4) fourthOfJanuary.setUTCHours(0, 0, 0, 0) - date = startOfUTCISOYear(fourthOfJanuary, options) + date = startOfUTCISOYear(fourthOfJanuary, dirtyOptions) date.setUTCDate(date.getUTCDate() + diff) return date } diff --git a/src/parse/_lib/setUTCISOYear/test.js b/src/parse/_lib/setUTCISOYear/test.js index 0213b2beec..71bcc5b06a 100644 --- a/src/parse/_lib/setUTCISOYear/test.js +++ b/src/parse/_lib/setUTCISOYear/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import setUTCISOYear from '.' -describe('setUTCISOYear', function () { +describe('parse > setUTCISOYear', function () { it('sets the ISO week-numbering year, saving the ISO week and the day of the week', function () { var result = setUTCISOYear(new Date(Date.UTC(2008, 11 /* Dec */, 29)), 2007) assert.deepEqual(result, new Date(Date.UTC(2007, 0 /* Jan */, 1))) @@ -20,6 +20,11 @@ describe('setUTCISOYear', function () { assert.deepEqual(result, new Date(Date.UTC(2005, 0 /* Jan */, 1))) }) + it('implicitly converts number arguments', function () { + var result = setUTCISOYear(new Date(Date.UTC(2008, 11 /* Dec */, 29)), '2007') + assert.deepEqual(result, new Date(Date.UTC(2007, 0 /* Jan */, 1))) + }) + it('does not mutate the original date', function () { var date = new Date(Date.UTC(2008, 11 /* Dec */, 29)) setUTCISOYear(date, 2000) diff --git a/src/parse/_lib/startOfUTCISOWeek/index.js b/src/parse/_lib/startOfUTCISOWeek/index.js index 335a09cf12..d1b9d84a38 100644 --- a/src/parse/_lib/startOfUTCISOWeek/index.js +++ b/src/parse/_lib/startOfUTCISOWeek/index.js @@ -2,10 +2,10 @@ import toDate from '../../../toDate/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function startOfUTCISOWeek (dirtyDate, options) { +export default function startOfUTCISOWeek (dirtyDate, dirtyOptions) { var weekStartsOn = 1 - var date = toDate(dirtyDate, options) + var date = toDate(dirtyDate, dirtyOptions) var day = date.getUTCDay() var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn diff --git a/src/parse/_lib/startOfUTCISOWeek/test.js b/src/parse/_lib/startOfUTCISOWeek/test.js index 85db34a9e9..eee0373a97 100644 --- a/src/parse/_lib/startOfUTCISOWeek/test.js +++ b/src/parse/_lib/startOfUTCISOWeek/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import startOfUTCISOWeek from '.' -describe('startOfUTCISOWeek', function () { +describe('parse > startOfUTCISOWeek', function () { it('returns the date with the time setted to 00:00:00 and the date setted to the first day of an ISO week', function () { var date = new Date(Date.UTC(2014, 8 /* Sep */, 2, 11, 55, 0)) var result = startOfUTCISOWeek(date) diff --git a/src/parse/_lib/startOfUTCISOYear/index.js b/src/parse/_lib/startOfUTCISOYear/index.js index 83ee382915..d1a6f57eec 100644 --- a/src/parse/_lib/startOfUTCISOYear/index.js +++ b/src/parse/_lib/startOfUTCISOYear/index.js @@ -3,11 +3,11 @@ import startOfUTCISOWeek from '../startOfUTCISOWeek/index.js' // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 -export default function startOfUTCISOYear (dirtyDate, options) { - var year = getUTCISOYear(dirtyDate, options) +export default function startOfUTCISOYear (dirtyDate, dirtyOptions) { + var year = getUTCISOYear(dirtyDate, dirtyOptions) var fourthOfJanuary = new Date(0) fourthOfJanuary.setUTCFullYear(year, 0, 4) fourthOfJanuary.setUTCHours(0, 0, 0, 0) - var date = startOfUTCISOWeek(fourthOfJanuary, options) + var date = startOfUTCISOWeek(fourthOfJanuary, dirtyOptions) return date } diff --git a/src/parse/_lib/startOfUTCISOYear/test.js b/src/parse/_lib/startOfUTCISOYear/test.js index 5357bcd401..b87dd02812 100644 --- a/src/parse/_lib/startOfUTCISOYear/test.js +++ b/src/parse/_lib/startOfUTCISOYear/test.js @@ -4,7 +4,7 @@ import assert from 'power-assert' import startOfUTCISOYear from '.' -describe('startOfUTCISOYear', function () { +describe('parse > startOfUTCISOYear', function () { it('returns the date with the time setted to 00:00:00 and the date setted to the first day of an ISO year', function () { var result = startOfUTCISOYear(new Date(Date.UTC(2009, 0 /* Jan */, 1, 16, 0))) assert.deepEqual(result, new Date(Date.UTC(2008, 11 /* Dec */, 29, 0, 0, 0, 0))) diff --git a/src/parse/index.js b/src/parse/index.js index 8e7e5f9a67..a74ee5a7a0 100644 --- a/src/parse/index.js +++ b/src/parse/index.js @@ -78,7 +78,11 @@ var MILLISECONDS_IN_MINUTE = 60000 * * The result may vary by locale. * - * If no format is provided, the string will be parsed using ISO 8601 formats. + * If `formatString` matches with `dateString` but does not provides tokens, `baseDate` will be returned. + * + * If parsing failed, `Invalid Date` will be returned. + * Invalid Date is a Date, whose time value is NaN. + * Time value of Date: http://es5.github.io/#x15.9.1.1 * * @param {String} dateString - the string to parse * @param {String} formatString - the string of tokens @@ -108,13 +112,19 @@ var MILLISECONDS_IN_MINUTE = 60000 * ) * //=> Sun Feb 28 2010 00:00:00 */ -export default function parse (dateString, formatString, dirtyBaseDate, options) { +export default function parse (dirtyDateString, dirtyFormatString, dirtyBaseDate, dirtyOptions) { + var dateString = String(dirtyDateString) + var formatString = String(dirtyFormatString) + var options = dirtyOptions || {} + if (formatString === '') { - return '' + if (dateString === '') { + return toDate(dirtyBaseDate, options) + } else { + return new Date(NaN) + } } - options = options || {} - var locale = options.locale var localeParsers = enLocale.parse.parsers var localeUnits = enLocale.parse.units @@ -149,7 +159,7 @@ export default function parse (dateString, formatString, dirtyBaseDate, options) var matchResult = parser.match.exec(dateString) if (!matchResult) { - return null + return new Date(NaN) } var unitName = parser.unit @@ -171,7 +181,7 @@ export default function parse (dateString, formatString, dirtyBaseDate, options) if (dateString.indexOf(head) === 0) { dateString = dateString.slice(head.length) } else { - return null + return new Date(NaN) } } } diff --git a/src/parse/index.js.flow b/src/parse/index.js.flow index fbed6b5602..5041e34e10 100644 --- a/src/parse/index.js.flow +++ b/src/parse/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/parse/test.js b/src/parse/test.js index 3cf89c7d87..405fb8f9fb 100644 --- a/src/parse/test.js +++ b/src/parse/test.js @@ -510,6 +510,32 @@ describe('parse', function () { }) }) + describe('implicit conversion of options', function () { + it('`dateString`', function () { + // eslint-disable-next-line no-new-wrappers + var dateString = new String('20161105T040404') + // $ExpectedMistake + var result = parse(dateString, 'YYYYMMDDTHHmmss', baseDate) + assert.deepEqual(result, new Date(2016, 10 /* Nov */, 5, 4, 4, 4, 0)) + }) + + it('`formatString`', function () { + // eslint-disable-next-line no-new-wrappers + var formatString = new String('YYYYMMDDTHHmmss') + // $ExpectedMistake + var result = parse('20161105T040404', formatString, baseDate) + assert.deepEqual(result, new Date(2016, 10 /* Nov */, 5, 4, 4, 4, 0)) + }) + + it('`options.weekStartsOn`', function () { + var dateString = '0' + var formatString = 'd' + // $ExpectedMistake + var result = parse(dateString, formatString, baseDate, {weekStartsOn: '1'}) + assert.deepEqual(result, new Date(1986, 3 /* Apr */, 6)) + }) + }) + describe('custom locale', function () { it('can be passed to the function', function () { var units = { @@ -703,4 +729,64 @@ describe('parse', function () { }) }) }) + + it('accepts a string as `baseDate`', function () { + var dateString = '6 p.m.' + var formatString = 'h aa' + var result = parse(dateString, formatString, baseDate.toISOString()) + assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 18)) + }) + + it('accepts a timestamp as `baseDate`', function () { + var dateString = '6 p.m.' + var formatString = 'h aa' + var result = parse(dateString, formatString, baseDate.getTime()) + assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 18)) + }) + + it('does not mutate `baseDate`', function () { + var baseDateClone1 = new Date(baseDate.getTime()) + var baseDateClone2 = new Date(baseDate.getTime()) + var dateString = '6 p.m.' + var formatString = 'h aa' + parse(dateString, formatString, baseDateClone1) + assert.deepEqual(baseDateClone1, baseDateClone2) + }) + + describe('failure', function () { + it('returns `baseDate` if `dateString` and `formatString` are empty strings', function () { + var dateString = '' + var formatString = '' + var result = parse(dateString, formatString, baseDate) + assert.deepEqual(result, baseDate) + }) + + it('returns `baseDate` if no tokens in `formatString` are provided', function () { + var dateString = 'not a token' + var formatString = '[not a token]' + var result = parse(dateString, formatString, baseDate) + assert.deepEqual(result, baseDate) + }) + + it('returns `Invalid Date` if `formatString` doesn\'t match with `dateString`', function () { + var dateString = '2017-01-01' + var formatString = 'YYYY/MM/DD' + var result = parse(dateString, formatString, baseDate) + assert(result instanceof Date && isNaN(result)) + }) + + it('returns `Invalid Date` if `formatString` tokens failed to parse a value', function () { + var dateString = '2017-01-01' + var formatString = 'MMMM Do YYYY' + var result = parse(dateString, formatString, baseDate) + assert(result instanceof Date && isNaN(result)) + }) + + it('returns `Invalid Date` if `formatString` is empty string but `dateString` is not', function () { + var dateString = '2017-01-01' + var formatString = '' + var result = parse(dateString, formatString, baseDate) + assert(result instanceof Date && isNaN(result)) + }) + }) }) diff --git a/src/setDate/index.js.flow b/src/setDate/index.js.flow index 65f44a57ff..745f7ca977 100644 --- a/src/setDate/index.js.flow +++ b/src/setDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setDay/index.js.flow b/src/setDay/index.js.flow index 55f1ebff4e..be57d71097 100644 --- a/src/setDay/index.js.flow +++ b/src/setDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setDayOfYear/index.js.flow b/src/setDayOfYear/index.js.flow index 5e0f5def0e..43c05251dd 100644 --- a/src/setDayOfYear/index.js.flow +++ b/src/setDayOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setHours/index.js.flow b/src/setHours/index.js.flow index db8e717808..38664fb53e 100644 --- a/src/setHours/index.js.flow +++ b/src/setHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setISODay/index.js.flow b/src/setISODay/index.js.flow index 55f1ebff4e..be57d71097 100644 --- a/src/setISODay/index.js.flow +++ b/src/setISODay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setISOWeek/index.js.flow b/src/setISOWeek/index.js.flow index 74b97c9666..41baa1366c 100644 --- a/src/setISOWeek/index.js.flow +++ b/src/setISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setISOYear/index.js.flow b/src/setISOYear/index.js.flow index 63b5ea9596..6303b3dfbe 100644 --- a/src/setISOYear/index.js.flow +++ b/src/setISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setMilliseconds/index.js.flow b/src/setMilliseconds/index.js.flow index 174f95b1e9..40cca62feb 100644 --- a/src/setMilliseconds/index.js.flow +++ b/src/setMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setMinutes/index.js.flow b/src/setMinutes/index.js.flow index 990b138828..59eddc3d31 100644 --- a/src/setMinutes/index.js.flow +++ b/src/setMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setMonth/index.js.flow b/src/setMonth/index.js.flow index 8ad5798910..592c337833 100644 --- a/src/setMonth/index.js.flow +++ b/src/setMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setQuarter/index.js.flow b/src/setQuarter/index.js.flow index 8b23c319bd..64d4b1b403 100644 --- a/src/setQuarter/index.js.flow +++ b/src/setQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setSeconds/index.js.flow b/src/setSeconds/index.js.flow index 445b212fb8..0e70074a83 100644 --- a/src/setSeconds/index.js.flow +++ b/src/setSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/setYear/index.js.flow b/src/setYear/index.js.flow index 16b64bc4e8..50135eea90 100644 --- a/src/setYear/index.js.flow +++ b/src/setYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfDay/index.js b/src/startOfDay/index.js index f025595f69..d1688306d5 100644 --- a/src/startOfDay/index.js +++ b/src/startOfDay/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 02 2014 00:00:00 */ -export default function startOfDay (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function startOfDay (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setHours(0, 0, 0, 0) return date } diff --git a/src/startOfDay/index.js.flow b/src/startOfDay/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfDay/index.js.flow +++ b/src/startOfDay/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfHour/index.js b/src/startOfHour/index.js index 824202a1a2..cc437ad086 100644 --- a/src/startOfHour/index.js +++ b/src/startOfHour/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfHour(new Date(2014, 8, 2, 11, 55)) * //=> Tue Sep 02 2014 11:00:00 */ -export default function startOfHour (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function startOfHour (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setMinutes(0, 0, 0) return date } diff --git a/src/startOfHour/index.js.flow b/src/startOfHour/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfHour/index.js.flow +++ b/src/startOfHour/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfISOWeek/index.js b/src/startOfISOWeek/index.js index 8c98a915dd..e1a840c220 100644 --- a/src/startOfISOWeek/index.js +++ b/src/startOfISOWeek/index.js @@ -21,8 +21,8 @@ import cloneObject from '../_lib/cloneObject/index.js' * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Mon Sep 01 2014 00:00:00 */ -export default function startOfISOWeek (dirtyDate, options) { - var startOfWeekOptions = cloneObject(options) +export default function startOfISOWeek (dirtyDate, dirtyOptions) { + var startOfWeekOptions = cloneObject(dirtyOptions) startOfWeekOptions.weekStartsOn = 1 return startOfWeek(dirtyDate, startOfWeekOptions) } diff --git a/src/startOfISOWeek/index.js.flow b/src/startOfISOWeek/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfISOWeek/index.js.flow +++ b/src/startOfISOWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfISOYear/index.js b/src/startOfISOYear/index.js index 7549d6b0fa..7936f34e8f 100644 --- a/src/startOfISOYear/index.js +++ b/src/startOfISOYear/index.js @@ -22,11 +22,11 @@ import startOfISOWeek from '../startOfISOWeek/index.js' * var result = startOfISOYear(new Date(2005, 6, 2)) * //=> Mon Jan 03 2005 00:00:00 */ -export default function startOfISOYear (dirtyDate, options) { - var year = getISOYear(dirtyDate, options) +export default function startOfISOYear (dirtyDate, dirtyOptions) { + var year = getISOYear(dirtyDate, dirtyOptions) var fourthOfJanuary = new Date(0) fourthOfJanuary.setFullYear(year, 0, 4) fourthOfJanuary.setHours(0, 0, 0, 0) - var date = startOfISOWeek(fourthOfJanuary, options) + var date = startOfISOWeek(fourthOfJanuary, dirtyOptions) return date } diff --git a/src/startOfISOYear/index.js.flow b/src/startOfISOYear/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfISOYear/index.js.flow +++ b/src/startOfISOYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfMinute/index.js b/src/startOfMinute/index.js index c7eb45fcdf..15f90eed69 100644 --- a/src/startOfMinute/index.js +++ b/src/startOfMinute/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400)) * //=> Mon Dec 01 2014 22:15:00 */ -export default function startOfMinute (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function startOfMinute (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setSeconds(0, 0) return date } diff --git a/src/startOfMinute/index.js.flow b/src/startOfMinute/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfMinute/index.js.flow +++ b/src/startOfMinute/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfMonth/index.js b/src/startOfMonth/index.js index 5cfd004391..c8a4a23c70 100644 --- a/src/startOfMonth/index.js +++ b/src/startOfMonth/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0)) * //=> Mon Sep 01 2014 00:00:00 */ -export default function startOfMonth (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function startOfMonth (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setDate(1) date.setHours(0, 0, 0, 0) return date diff --git a/src/startOfMonth/index.js.flow b/src/startOfMonth/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfMonth/index.js.flow +++ b/src/startOfMonth/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfQuarter/index.js b/src/startOfQuarter/index.js index 09d8f8d09c..4644de4040 100644 --- a/src/startOfQuarter/index.js +++ b/src/startOfQuarter/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Jul 01 2014 00:00:00 */ -export default function startOfQuarter (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function startOfQuarter (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) var currentMonth = date.getMonth() var month = currentMonth - currentMonth % 3 date.setMonth(month, 1) diff --git a/src/startOfQuarter/index.js.flow b/src/startOfQuarter/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfQuarter/index.js.flow +++ b/src/startOfQuarter/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfSecond/index.js b/src/startOfSecond/index.js index 2d93737f8d..0d31c35d42 100644 --- a/src/startOfSecond/index.js +++ b/src/startOfSecond/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400)) * //=> Mon Dec 01 2014 22:15:45.000 */ -export default function startOfSecond (dirtyDate, options) { - var date = toDate(dirtyDate, options) +export default function startOfSecond (dirtyDate, dirtyOptions) { + var date = toDate(dirtyDate, dirtyOptions) date.setMilliseconds(0) return date } diff --git a/src/startOfSecond/index.js.flow b/src/startOfSecond/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfSecond/index.js.flow +++ b/src/startOfSecond/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfWeek/index.js.flow b/src/startOfWeek/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfWeek/index.js.flow +++ b/src/startOfWeek/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/startOfYear/index.js b/src/startOfYear/index.js index 437d7e7511..06ce77a2a1 100644 --- a/src/startOfYear/index.js +++ b/src/startOfYear/index.js @@ -18,8 +18,8 @@ import toDate from '../toDate/index.js' * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00)) * //=> Wed Jan 01 2014 00:00:00 */ -export default function startOfYear (dirtyDate, options) { - var cleanDate = toDate(dirtyDate, options) +export default function startOfYear (dirtyDate, dirtyOptions) { + var cleanDate = toDate(dirtyDate, dirtyOptions) var date = new Date(0) date.setFullYear(cleanDate.getFullYear(), 0, 1) date.setHours(0, 0, 0, 0) diff --git a/src/startOfYear/index.js.flow b/src/startOfYear/index.js.flow index 0605d9e6b0..77c379f747 100644 --- a/src/startOfYear/index.js.flow +++ b/src/startOfYear/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subDays/index.js.flow b/src/subDays/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subDays/index.js.flow +++ b/src/subDays/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subHours/index.js.flow b/src/subHours/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subHours/index.js.flow +++ b/src/subHours/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subISOYears/index.js.flow b/src/subISOYears/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subISOYears/index.js.flow +++ b/src/subISOYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subMilliseconds/index.js.flow b/src/subMilliseconds/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subMilliseconds/index.js.flow +++ b/src/subMilliseconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subMinutes/index.js.flow b/src/subMinutes/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subMinutes/index.js.flow +++ b/src/subMinutes/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subMonths/index.js.flow b/src/subMonths/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subMonths/index.js.flow +++ b/src/subMonths/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subQuarters/index.js.flow b/src/subQuarters/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subQuarters/index.js.flow +++ b/src/subQuarters/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subSeconds/index.js.flow b/src/subSeconds/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subSeconds/index.js.flow +++ b/src/subSeconds/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subWeeks/index.js.flow b/src/subWeeks/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subWeeks/index.js.flow +++ b/src/subWeeks/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/subYears/index.js.flow b/src/subYears/index.js.flow index e8b33a4f8e..134bb51f34 100644 --- a/src/subYears/index.js.flow +++ b/src/subYears/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/src/toDate/index.js.flow b/src/toDate/index.js.flow index 8fb3939129..05e236afb0 100644 --- a/src/toDate/index.js.flow +++ b/src/toDate/index.js.flow @@ -10,6 +10,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' } diff --git a/typings.d.ts b/typings.d.ts index d347ab91b5..98dd845cd1 100644 --- a/typings.d.ts +++ b/typings.d.ts @@ -35,6 +35,8 @@ type Options = { weekStartsOn?: number, additionalDigits?: 0 | 1 | 2, locale?: Locale, + includeSeconds?: boolean, + addSuffix?: boolean, unit?: 's' | 'm' | 'h' | 'd' | 'M' | 'Y', partialMethod?: 'floor' | 'ceil' | 'round' }