index.js.flow 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. // @flow
  2. // This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
  3. export type Interval = {
  4. start: Date | number,
  5. end: Date | number,
  6. }
  7. export type Locale = {
  8. code?: string,
  9. formatDistance?: (...args: Array<any>) => any,
  10. formatRelative?: (...args: Array<any>) => any,
  11. localize?: {
  12. ordinalNumber: (...args: Array<any>) => any,
  13. era: (...args: Array<any>) => any,
  14. quarter: (...args: Array<any>) => any,
  15. month: (...args: Array<any>) => any,
  16. day: (...args: Array<any>) => any,
  17. dayPeriod: (...args: Array<any>) => any,
  18. },
  19. formatLong?: {
  20. date: (...args: Array<any>) => any,
  21. time: (...args: Array<any>) => any,
  22. dateTime: (...args: Array<any>) => any,
  23. },
  24. match?: {
  25. ordinalNumber: (...args: Array<any>) => any,
  26. era: (...args: Array<any>) => any,
  27. quarter: (...args: Array<any>) => any,
  28. month: (...args: Array<any>) => any,
  29. day: (...args: Array<any>) => any,
  30. dayPeriod: (...args: Array<any>) => any,
  31. },
  32. options?: {
  33. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  34. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  35. },
  36. }
  37. export type Duration = {
  38. years?: number,
  39. months?: number,
  40. weeks?: number,
  41. days?: number,
  42. hours?: number,
  43. minutes?: number,
  44. seconds?: number,
  45. }
  46. export type Day = 0 | 1 | 2 | 3 | 4 | 5 | 6
  47. declare module.exports: {
  48. add: (date: Date | number, duration: Duration) => Date,
  49. addBusinessDays: (date: Date | number, amount: number) => Date,
  50. addDays: (date: Date | number, amount: number) => Date,
  51. addHours: (date: Date | number, amount: number) => Date,
  52. addISOWeekYears: (date: Date | number, amount: number) => Date,
  53. addMilliseconds: (date: Date | number, amount: number) => Date,
  54. addMinutes: (date: Date | number, amount: number) => Date,
  55. addMonths: (date: Date | number, amount: number) => Date,
  56. addQuarters: (date: Date | number, amount: number) => Date,
  57. addSeconds: (date: Date | number, amount: number) => Date,
  58. addWeeks: (date: Date | number, amount: number) => Date,
  59. addYears: (date: Date | number, amount: number) => Date,
  60. areIntervalsOverlapping: (
  61. intervalLeft: Interval,
  62. intervalRight: Interval,
  63. options?: {
  64. inclusive?: boolean,
  65. }
  66. ) => boolean,
  67. clamp: (date: Date | number, interval: Interval) => Date,
  68. closestIndexTo: (
  69. dateToCompare: Date | number,
  70. datesArray: (Date | number)[]
  71. ) => ?number,
  72. closestTo: (
  73. dateToCompare: Date | number,
  74. datesArray: (Date | number)[]
  75. ) => ?Date,
  76. compareAsc: (dateLeft: Date | number, dateRight: Date | number) => number,
  77. compareDesc: (dateLeft: Date | number, dateRight: Date | number) => number,
  78. daysToWeeks: (days: number) => number,
  79. differenceInBusinessDays: (
  80. dateLeft: Date | number,
  81. dateRight: Date | number
  82. ) => number,
  83. differenceInCalendarDays: (
  84. dateLeft: Date | number,
  85. dateRight: Date | number
  86. ) => number,
  87. differenceInCalendarISOWeeks: (
  88. dateLeft: Date | number,
  89. dateRight: Date | number
  90. ) => number,
  91. differenceInCalendarISOWeekYears: (
  92. dateLeft: Date | number,
  93. dateRight: Date | number
  94. ) => number,
  95. differenceInCalendarMonths: (
  96. dateLeft: Date | number,
  97. dateRight: Date | number
  98. ) => number,
  99. differenceInCalendarQuarters: (
  100. dateLeft: Date | number,
  101. dateRight: Date | number
  102. ) => number,
  103. differenceInCalendarWeeks: (
  104. dateLeft: Date | number,
  105. dateRight: Date | number,
  106. options?: {
  107. locale?: Locale,
  108. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  109. }
  110. ) => number,
  111. differenceInCalendarYears: (
  112. dateLeft: Date | number,
  113. dateRight: Date | number
  114. ) => number,
  115. differenceInDays: (
  116. dateLeft: Date | number,
  117. dateRight: Date | number
  118. ) => number,
  119. differenceInHours: (
  120. dateLeft: Date | number,
  121. dateRight: Date | number,
  122. options?: {
  123. roundingMethod?: string,
  124. }
  125. ) => number,
  126. differenceInISOWeekYears: (
  127. dateLeft: Date | number,
  128. dateRight: Date | number
  129. ) => number,
  130. differenceInMilliseconds: (
  131. dateLeft: Date | number,
  132. dateRight: Date | number
  133. ) => number,
  134. differenceInMinutes: (
  135. dateLeft: Date | number,
  136. dateRight: Date | number,
  137. options?: {
  138. roundingMethod?: string,
  139. }
  140. ) => number,
  141. differenceInMonths: (
  142. dateLeft: Date | number,
  143. dateRight: Date | number
  144. ) => number,
  145. differenceInQuarters: (
  146. dateLeft: Date | number,
  147. dateRight: Date | number,
  148. options?: {
  149. roundingMethod?: string,
  150. }
  151. ) => number,
  152. differenceInSeconds: (
  153. dateLeft: Date | number,
  154. dateRight: Date | number,
  155. options?: {
  156. roundingMethod?: string,
  157. }
  158. ) => number,
  159. differenceInWeeks: (
  160. dateLeft: Date | number,
  161. dateRight: Date | number,
  162. options?: {
  163. roundingMethod?: string,
  164. }
  165. ) => number,
  166. differenceInYears: (
  167. dateLeft: Date | number,
  168. dateRight: Date | number
  169. ) => number,
  170. eachDayOfInterval: (
  171. interval: Interval,
  172. options?: {
  173. step?: number,
  174. }
  175. ) => Date[],
  176. eachHourOfInterval: (
  177. interval: Interval,
  178. options?: {
  179. step?: number,
  180. }
  181. ) => Date[],
  182. eachMinuteOfInterval: (
  183. interval: Interval,
  184. options?: {
  185. step?: number,
  186. }
  187. ) => Date[],
  188. eachMonthOfInterval: (interval: Interval) => Date[],
  189. eachQuarterOfInterval: (interval: Interval) => Date[],
  190. eachWeekendOfInterval: (interval: Interval) => Date[],
  191. eachWeekendOfMonth: (date: Date | number) => Date[],
  192. eachWeekendOfYear: (date: Date | number) => Date[],
  193. eachWeekOfInterval: (
  194. interval: Interval,
  195. options?: {
  196. locale?: Locale,
  197. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  198. }
  199. ) => Date[],
  200. eachYearOfInterval: (interval: Interval) => Date[],
  201. endOfDay: (date: Date | number) => Date,
  202. endOfDecade: (
  203. date: Date | number,
  204. options?: {
  205. additionalDigits?: 0 | 1 | 2,
  206. }
  207. ) => Date,
  208. endOfHour: (date: Date | number) => Date,
  209. endOfISOWeek: (date: Date | number) => Date,
  210. endOfISOWeekYear: (date: Date | number) => Date,
  211. endOfMinute: (date: Date | number) => Date,
  212. endOfMonth: (date: Date | number) => Date,
  213. endOfQuarter: (date: Date | number) => Date,
  214. endOfSecond: (date: Date | number) => Date,
  215. endOfToday: () => Date,
  216. endOfTomorrow: () => Date,
  217. endOfWeek: (
  218. date: Date | number,
  219. options?: {
  220. locale?: Locale,
  221. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  222. }
  223. ) => Date,
  224. endOfYear: (date: Date | number) => Date,
  225. endOfYesterday: () => Date,
  226. format: (
  227. date: Date | number,
  228. format: string,
  229. options?: {
  230. locale?: Locale,
  231. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  232. firstWeekContainsDate?: number,
  233. useAdditionalWeekYearTokens?: boolean,
  234. useAdditionalDayOfYearTokens?: boolean,
  235. }
  236. ) => string,
  237. formatDistance: (
  238. date: Date | number,
  239. baseDate: Date | number,
  240. options?: {
  241. includeSeconds?: boolean,
  242. addSuffix?: boolean,
  243. locale?: Locale,
  244. }
  245. ) => string,
  246. formatDistanceStrict: (
  247. date: Date | number,
  248. baseDate: Date | number,
  249. options?: {
  250. addSuffix?: boolean,
  251. unit?: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year',
  252. roundingMethod?: 'floor' | 'ceil' | 'round',
  253. locale?: Locale,
  254. }
  255. ) => string,
  256. formatDistanceToNow: (
  257. date: Date | number,
  258. options?: {
  259. includeSeconds?: boolean,
  260. addSuffix?: boolean,
  261. locale?: Locale,
  262. }
  263. ) => string,
  264. formatDistanceToNowStrict: (
  265. date: Date | number,
  266. options?: {
  267. addSuffix?: boolean,
  268. unit?: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year',
  269. roundingMethod?: 'floor' | 'ceil' | 'round',
  270. locale?: Locale,
  271. }
  272. ) => string,
  273. formatDuration: (
  274. duration: Duration,
  275. options?: {
  276. format?: string[],
  277. zero?: boolean,
  278. delimiter?: string,
  279. locale?: Locale,
  280. }
  281. ) => string,
  282. formatISO: (
  283. date: Date | number,
  284. options?: {
  285. format?: 'extended' | 'basic',
  286. representation?: 'complete' | 'date' | 'time',
  287. }
  288. ) => string,
  289. formatISO9075: (
  290. date: Date | number,
  291. options?: {
  292. format?: 'extended' | 'basic',
  293. representation?: 'complete' | 'date' | 'time',
  294. }
  295. ) => string,
  296. formatISODuration: (duration: Duration) => string,
  297. formatRelative: (
  298. date: Date | number,
  299. baseDate: Date | number,
  300. options?: {
  301. locale?: Locale,
  302. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  303. }
  304. ) => string,
  305. formatRFC3339: (
  306. date: Date | number,
  307. options?: {
  308. fractionDigits?: 0 | 1 | 2 | 3,
  309. }
  310. ) => string,
  311. formatRFC7231: (date: Date | number) => string,
  312. fromUnixTime: (unixTime: number) => Date,
  313. getDate: (date: Date | number) => number,
  314. getDay: (date: Date | number) => 0 | 1 | 2 | 3 | 4 | 5 | 6,
  315. getDayOfYear: (date: Date | number) => number,
  316. getDaysInMonth: (date: Date | number) => number,
  317. getDaysInYear: (date: Date | number) => number,
  318. getDecade: (date: Date | number) => number,
  319. getDefaultOptions: () => Object,
  320. getHours: (date: Date | number) => number,
  321. getISODay: (date: Date | number) => number,
  322. getISOWeek: (date: Date | number) => number,
  323. getISOWeeksInYear: (date: Date | number) => number,
  324. getISOWeekYear: (date: Date | number) => number,
  325. getMilliseconds: (date: Date | number) => number,
  326. getMinutes: (date: Date | number) => number,
  327. getMonth: (date: Date | number) => number,
  328. getOverlappingDaysInIntervals: (
  329. intervalLeft: Interval,
  330. intervalRight: Interval
  331. ) => number,
  332. getQuarter: (date: Date | number) => number,
  333. getSeconds: (date: Date | number) => number,
  334. getTime: (date: Date | number) => number,
  335. getUnixTime: (date: Date | number) => number,
  336. getWeek: (
  337. date: Date | number,
  338. options?: {
  339. locale?: Locale,
  340. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  341. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  342. }
  343. ) => number,
  344. getWeekOfMonth: (
  345. date: Date | number,
  346. options?: {
  347. locale?: Locale,
  348. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  349. }
  350. ) => number,
  351. getWeeksInMonth: (
  352. date: Date | number,
  353. options?: {
  354. locale?: Locale,
  355. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  356. }
  357. ) => number,
  358. getWeekYear: (
  359. date: Date | number,
  360. options?: {
  361. locale?: Locale,
  362. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  363. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  364. }
  365. ) => number,
  366. getYear: (date: Date | number) => number,
  367. hoursToMilliseconds: (hours: number) => number,
  368. hoursToMinutes: (hours: number) => number,
  369. hoursToSeconds: (hours: number) => number,
  370. intervalToDuration: (interval: Interval) => Duration,
  371. intlFormat: (
  372. argument: Date | number,
  373. formatOptions?: {
  374. localeMatcher?: 'lookup' | 'best fit',
  375. weekday?: 'narrow' | 'short' | 'long',
  376. era?: 'narrow' | 'short' | 'long',
  377. year?: 'numeric' | '2-digit',
  378. month?: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long',
  379. day?: 'numeric' | '2-digit',
  380. hour?: 'numeric' | '2-digit',
  381. minute?: 'numeric' | '2-digit',
  382. second?: 'numeric' | '2-digit',
  383. timeZoneName?: 'short' | 'long',
  384. formatMatcher?: 'basic' | 'best fit',
  385. hour12?: boolean,
  386. timeZone?: string,
  387. },
  388. localeOptions?: {
  389. locale?: string | string[],
  390. }
  391. ) => string,
  392. intlFormatDistance: (
  393. date: Date | number,
  394. baseDate: Date | number,
  395. options?: {
  396. unit?: string,
  397. locale?: string | string[],
  398. localeMatcher?: string,
  399. numeric?: string,
  400. style?: string,
  401. }
  402. ) => string,
  403. isAfter: (date: Date | number, dateToCompare: Date | number) => boolean,
  404. isBefore: (date: Date | number, dateToCompare: Date | number) => boolean,
  405. isDate: (value: any) => boolean,
  406. isEqual: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  407. isExists: (year: number, month: number, day: number) => boolean,
  408. isFirstDayOfMonth: (date: Date | number) => boolean,
  409. isFriday: (date: Date | number) => boolean,
  410. isFuture: (date: Date | number) => boolean,
  411. isLastDayOfMonth: (date: Date | number) => boolean,
  412. isLeapYear: (date: Date | number) => boolean,
  413. isMatch: (
  414. dateString: string,
  415. formatString: string,
  416. options?: {
  417. locale?: Locale,
  418. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  419. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  420. useAdditionalWeekYearTokens?: boolean,
  421. useAdditionalDayOfYearTokens?: boolean,
  422. }
  423. ) => boolean,
  424. isMonday: (date: Date | number) => boolean,
  425. isPast: (date: Date | number) => boolean,
  426. isSameDay: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  427. isSameHour: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  428. isSameISOWeek: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  429. isSameISOWeekYear: (
  430. dateLeft: Date | number,
  431. dateRight: Date | number
  432. ) => boolean,
  433. isSameMinute: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  434. isSameMonth: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  435. isSameQuarter: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  436. isSameSecond: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  437. isSameWeek: (
  438. dateLeft: Date | number,
  439. dateRight: Date | number,
  440. options?: {
  441. locale?: Locale,
  442. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  443. }
  444. ) => boolean,
  445. isSameYear: (dateLeft: Date | number, dateRight: Date | number) => boolean,
  446. isSaturday: (date: Date | number) => boolean,
  447. isSunday: (date: Date | number) => boolean,
  448. isThisHour: (date: Date | number) => boolean,
  449. isThisISOWeek: (date: Date | number) => boolean,
  450. isThisMinute: (date: Date | number) => boolean,
  451. isThisMonth: (date: Date | number) => boolean,
  452. isThisQuarter: (date: Date | number) => boolean,
  453. isThisSecond: (date: Date | number) => boolean,
  454. isThisWeek: (
  455. date: Date | number,
  456. options?: {
  457. locale?: Locale,
  458. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  459. }
  460. ) => boolean,
  461. isThisYear: (date: Date | number) => boolean,
  462. isThursday: (date: Date | number) => boolean,
  463. isToday: (date: Date | number) => boolean,
  464. isTomorrow: (date: Date | number) => boolean,
  465. isTuesday: (date: Date | number) => boolean,
  466. isValid: (date: any) => boolean,
  467. isWednesday: (date: Date | number) => boolean,
  468. isWeekend: (date: Date | number) => boolean,
  469. isWithinInterval: (date: Date | number, interval: Interval) => boolean,
  470. isYesterday: (date: Date | number) => boolean,
  471. lastDayOfDecade: (date: Date | number) => Date,
  472. lastDayOfISOWeek: (date: Date | number) => Date,
  473. lastDayOfISOWeekYear: (date: Date | number) => Date,
  474. lastDayOfMonth: (date: Date | number) => Date,
  475. lastDayOfQuarter: (
  476. date: Date | number,
  477. options?: {
  478. additionalDigits?: 0 | 1 | 2,
  479. }
  480. ) => Date,
  481. lastDayOfWeek: (
  482. date: Date | number,
  483. options?: {
  484. locale?: Locale,
  485. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  486. }
  487. ) => Date,
  488. lastDayOfYear: (date: Date | number) => Date,
  489. lightFormat: (date: Date | number, format: string) => string,
  490. max: (datesArray: (Date | number)[]) => Date,
  491. milliseconds: (duration: Duration) => number,
  492. millisecondsToHours: (milliseconds: number) => number,
  493. millisecondsToMinutes: (milliseconds: number) => number,
  494. millisecondsToSeconds: (milliseconds: number) => number,
  495. min: (datesArray: (Date | number)[]) => Date,
  496. minutesToHours: (minutes: number) => number,
  497. minutesToMilliseconds: (minutes: number) => number,
  498. minutesToSeconds: (minutes: number) => number,
  499. monthsToQuarters: (months: number) => number,
  500. monthsToYears: (months: number) => number,
  501. nextDay: (date: Date | number, day: Day) => Date,
  502. nextFriday: (date: Date | number) => Date,
  503. nextMonday: (date: Date | number) => Date,
  504. nextSaturday: (date: Date | number) => Date,
  505. nextSunday: (date: Date | number) => Date,
  506. nextThursday: (date: Date | number) => Date,
  507. nextTuesday: (date: Date | number) => Date,
  508. nextWednesday: (date: Date | number) => Date,
  509. parse: (
  510. dateString: string,
  511. formatString: string,
  512. referenceDate: Date | number,
  513. options?: {
  514. locale?: Locale,
  515. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  516. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  517. useAdditionalWeekYearTokens?: boolean,
  518. useAdditionalDayOfYearTokens?: boolean,
  519. }
  520. ) => Date,
  521. parseISO: (
  522. argument: string,
  523. options?: {
  524. additionalDigits?: 0 | 1 | 2,
  525. }
  526. ) => Date,
  527. parseJSON: (argument: string | number | Date) => Date,
  528. previousDay: (date: Date | number, day: number) => Date,
  529. previousFriday: (date: Date | number) => Date,
  530. previousMonday: (date: Date | number) => Date,
  531. previousSaturday: (date: Date | number) => Date,
  532. previousSunday: (date: Date | number) => Date,
  533. previousThursday: (date: Date | number) => Date,
  534. previousTuesday: (date: Date | number) => Date,
  535. previousWednesday: (date: Date | number) => Date,
  536. quartersToMonths: (quarters: number) => number,
  537. quartersToYears: (quarters: number) => number,
  538. roundToNearestMinutes: (
  539. date: Date | number,
  540. options?: {
  541. nearestTo?: number,
  542. roundingMethod?: string,
  543. }
  544. ) => Date,
  545. secondsToHours: (seconds: number) => number,
  546. secondsToMilliseconds: (seconds: number) => number,
  547. secondsToMinutes: (seconds: number) => number,
  548. set: (
  549. date: Date | number,
  550. values: {
  551. year?: number,
  552. month?: number,
  553. date?: number,
  554. hours?: number,
  555. minutes?: number,
  556. seconds?: number,
  557. milliseconds?: number,
  558. }
  559. ) => Date,
  560. setDate: (date: Date | number, dayOfMonth: number) => Date,
  561. setDay: (
  562. date: Date | number,
  563. day: number,
  564. options?: {
  565. locale?: Locale,
  566. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  567. }
  568. ) => Date,
  569. setDayOfYear: (date: Date | number, dayOfYear: number) => Date,
  570. setDefaultOptions: (newOptions: {
  571. locale?: Locale,
  572. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  573. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  574. }) => void,
  575. setHours: (date: Date | number, hours: number) => Date,
  576. setISODay: (date: Date | number, day: number) => Date,
  577. setISOWeek: (date: Date | number, isoWeek: number) => Date,
  578. setISOWeekYear: (date: Date | number, isoWeekYear: number) => Date,
  579. setMilliseconds: (date: Date | number, milliseconds: number) => Date,
  580. setMinutes: (date: Date | number, minutes: number) => Date,
  581. setMonth: (date: Date | number, month: number) => Date,
  582. setQuarter: (date: Date | number, quarter: number) => Date,
  583. setSeconds: (date: Date | number, seconds: number) => Date,
  584. setWeek: (
  585. date: Date | number,
  586. week: number,
  587. options?: {
  588. locale?: Locale,
  589. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  590. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  591. }
  592. ) => Date,
  593. setWeekYear: (
  594. date: Date | number,
  595. weekYear: number,
  596. options?: {
  597. locale?: Locale,
  598. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  599. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  600. }
  601. ) => Date,
  602. setYear: (date: Date | number, year: number) => Date,
  603. startOfDay: (date: Date | number) => Date,
  604. startOfDecade: (date: Date | number) => Date,
  605. startOfHour: (date: Date | number) => Date,
  606. startOfISOWeek: (date: Date | number) => Date,
  607. startOfISOWeekYear: (date: Date | number) => Date,
  608. startOfMinute: (date: Date | number) => Date,
  609. startOfMonth: (date: Date | number) => Date,
  610. startOfQuarter: (date: Date | number) => Date,
  611. startOfSecond: (date: Date | number) => Date,
  612. startOfToday: () => Date,
  613. startOfTomorrow: () => Date,
  614. startOfWeek: (
  615. date: Date | number,
  616. options?: {
  617. locale?: Locale,
  618. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  619. }
  620. ) => Date,
  621. startOfWeekYear: (
  622. date: Date | number,
  623. options?: {
  624. locale?: Locale,
  625. weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
  626. firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
  627. }
  628. ) => Date,
  629. startOfYear: (date: Date | number) => Date,
  630. startOfYesterday: () => Date,
  631. sub: (date: Date | number, duration: Duration) => Date,
  632. subBusinessDays: (date: Date | number, amount: number) => Date,
  633. subDays: (date: Date | number, amount: number) => Date,
  634. subHours: (date: Date | number, amount: number) => Date,
  635. subISOWeekYears: (date: Date | number, amount: number) => Date,
  636. subMilliseconds: (date: Date | number, amount: number) => Date,
  637. subMinutes: (date: Date | number, amount: number) => Date,
  638. subMonths: (date: Date | number, amount: number) => Date,
  639. subQuarters: (date: Date | number, amount: number) => Date,
  640. subSeconds: (date: Date | number, amount: number) => Date,
  641. subWeeks: (date: Date | number, amount: number) => Date,
  642. subYears: (date: Date | number, amount: number) => Date,
  643. toDate: (argument: Date | number) => Date,
  644. weeksToDays: (weeks: number) => number,
  645. yearsToMonths: (years: number) => number,
  646. yearsToQuarters: (years: number) => number,
  647. daysInWeek: number,
  648. daysInYear: number,
  649. maxTime: number,
  650. millisecondsInMinute: number,
  651. millisecondsInHour: number,
  652. millisecondsInSecond: number,
  653. minTime: number,
  654. minutesInHour: number,
  655. monthsInQuarter: number,
  656. monthsInYear: number,
  657. quartersInYear: number,
  658. secondsInHour: number,
  659. secondsInMinute: number,
  660. secondsInDay: number,
  661. secondsInWeek: number,
  662. secondsInYear: number,
  663. secondsInMonth: number,
  664. secondsInQuarter: number,
  665. }