UNPKG

react-monaco-editor

Version:
1 lines 291 kB
{"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<script src=\"http://cdn.date-fns.org/VERSION/date_fns.min.js\"></script>\n<script>\n dateFns.isToday(new Date())\n //=> true\n</script>\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/koss/src/date-fns/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## [1.29.0] - 2017-10-11\n\n### Fixed\n\n- Fix Italian translations for `formatDistance`. ([see the issue: #550](https://github.com/date-fns/date-fns/issues/550); [see the PR: #552](https://github.com/date-fns/date-fns/pull/552))\n Thanks to [@giofilo](https://github.com/giofilo)!\n\n### Added\n\n- [Hungarian locale (hu)](https://github.com/date-fns/date-fns/pull/503)\n (thanks to László Horváth [@horvathlg](https://github.com/horvathlg))\n\n- [Slovenian locale (sl)](https://github.com/date-fns/date-fns/pull/505)\n (thanks to Adam Stradovnik [@Neoglyph](https://github.com/Neoglyph))\n\n- Add `step` to `eachDay` function. Thanks to [@BDav24](https://github.com/BDav24).\n See PR [#487](https://github.com/date-fns/date-fns/pull/487).\n\n## [1.28.5] - 2017-05-19\n\n### Fixed\n\n- Fix a.m./p.m. formatters in Chinese Simplified locale.\n Thanks to [@fnlctrl](https://github.com/fnlctrl).\n See PR [#486](https://github.com/date-fns/date-fns/pull/486)\n\n## [1.28.4] - 2017-04-26\n\n### Fixed\n\n- Fix accents on weekdays in the Italian locale.\n See PR [#481](https://github.com/date-fns/date-fns/pull/481).\n Thanks to [@albertorestifo](https://github.com/albertorestifo)\n\n- Fix typo in `ddd` format token in Spanish language locale.\n Kudos to [@fjaguero](https://github.com/fjaguero).\n See PR [#482](https://github.com/date-fns/date-fns/pull/482)\n\n## [1.28.3] - 2017-04-14\n\n### Fixed\n\n- Fix ordinal numbers for Danish language locale. Thanks to [@kgram](https://github.com/kgram).\n See PR [#474](https://github.com/date-fns/date-fns/pull/474)\n\n## [1.28.2] - 2017-03-27\n\n### Fixed\n\n- Fix `dd` and `ddd` formatters in Polish language locale. Kudos to [@justrag](https://github.com/justrag).\n See PR: [#467](https://github.com/date-fns/date-fns/pull/467)\n\n## [1.28.1] - 2017-03-19\n\n### Fixed\n\n- Fix DST border bug in `addMilliseconds`, `addSeconds`, `addMinutes`, `addHours`,\n `subMilliseconds`, `subSeconds`, `subMinutes` and `subHours`.\n See issue [#465](https://github.com/date-fns/date-fns/issues/465)\n\n- Minor fix for Indonesian locale. Thanks to [@bentinata](https://github.com/bentinata).\n See PR: [#458](https://github.com/date-fns/date-fns/pull/458)\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 `getOverlappingDayInRanges`\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.29.0...HEAD\n[1.29.0]: https://github.com/date-fns/date-fns/compare/v1.28.4...v1.29.0\n[1.28.5]: https://github.com/date-fns/date-fns/compare/v1.28.4...v1.28.5\n[1.28.4]: https://github.com/date-fns/date-fns/compare/v1.28.3...v1.28.4\n[1.28.3]: https://github.com/date-fns/date-fns/compare/v1.28.2...v1.28.3\n[1.28.2]: https://github.com/date-fns/date-fns/compare/v1.28.1...v1.28.2\n[1.28.1]: https://github.com/date-fns/date-fns/compare/v1.28.0...v1.28.1\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/koss/src/date-fns/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/koss/src/date-fns/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)\n and Song Shuoyun [@fnlctrl](https://github.com/fnlctrl))\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 Guillermo Grau [@guigrpa](https://github.com/guigrpa)\n and Fernando Agüero [@fjaguero](https://github.com/fjaguero))\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)\n and Benget Nata [@bentinata](https://github.com/bentinata))\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)\n and Just RAG [@justrag](https://github.com/justrag))\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)\n and [@kgram](https://github.com/kgram))\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/koss/src/date-fns/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/koss/src/date-fns/date-fns/LICENSE.md"}],"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","scope":"global","kind":"function","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.<Date>","Array.<String>","Array.<Number>"]},"description":"the array to search","name":"datesArray"}],"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","exceptions":[{"type":{"names":["TypeError"]},"description":"the second argument must be an instance of Array"}],"meta":{"lineno":26,"filename":"index.js","path":"/Users/koss/src/date-fns/date-fns/src/closest_index_to"},"summary":"Return an index of the closest date from the array comparing to the given date.","order":0},"args":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Array.<Date>","Array.<String>","Array.<Number>"]},"description":"the array to search","name":"datesArray"}],"usage":{"commonjs":{"title":"CommonJS","code":"var closestIndexTo = require('date-fns/closest_index_to')"},"umd":{"title":"UMD","code":"var closestIndexTo = dateFns.closestIndexTo"},"es2015":{"title":"ES 2015","code":"import closestIndexTo from 'date-fns/closest_index_to'"}},"usageTabs":["commonjs","umd","es2015"],"syntax":"closestIndexTo(dateToCompare, datesArray)"},{"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","scope":"global","kind":"function","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.<Date>","Array.<String>","Array.<Number>"]},"description":"the array to search","name":"datesArray"}],"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","exceptions":[{"type":{"names":["TypeError"]},"description":"the second argument must be an instance of Array"}],"meta":{"lineno":24,"filename":"index.js","path":"/Users/koss/src/date-fns/date-fns/src/closest_to"},"summary":"Return a date from the array closest to the given date.","order":0},"args":[{"type":{"names":["Date","String","Number"]},"description":"the date to compare with","name":"dateToCompare"},{"type":{"names":["Array.<Date>","Array.<String>","Array.<Number>"]},"description":"the array to search","name":"datesArray"}],"usage":{"commonjs":{"title":"CommonJS","code":"var closestTo = require('date-fns/closest_to')"},"umd":{"title":"UMD","code":"var closestTo = dateFns.closestTo"},"es2015":{"title":"ES 2015","code":"import closestTo from 'date-fns/closest_to'"}},"usageTabs":["commonjs","umd","es2015"],"syntax":"closestTo(dateToCompare, datesArray)"},{"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","scope":"global","kind":"function","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"}],"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":36,"filename":"index.js","path":"/Users/koss/src/date-fns/date-fns/src/compare_asc"},"summary":"Compare the two dates and return -1, 0 or 1.","order":0},"args":[{"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"}],"usage":{"commonjs":{"title":"CommonJS","code":"var compareAsc = require('date-fns/compare_asc')"},"umd":{"title":"UMD","code":"var compareAsc = dateFns.compareAsc"},"es2015":{"title":"ES 2015","code":"import compareAsc from 'date-fns/compare_asc'"}},"usageTabs":["commonjs","umd","es2015"],"syntax":"compareAsc(dateLeft, dateRight)"},{"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","scope":"global","kind":"function","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"}],"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":36,"filename":"index.js","path":"/Users/koss/src/date-fns/date-fns/src/compare_desc"},"summary":"Compare the two dates reverse chronologically and return -1, 0 or 1.","order":0},"args":[{"type":{