{"id":22423395,"url":"https://github.com/prantlf/date-fns-timezone","last_synced_at":"2025-04-04T16:14:25.936Z","repository":{"id":33001997,"uuid":"149085449","full_name":"prantlf/date-fns-timezone","owner":"prantlf","description":"Parsing and formatting date strings using IANA time zones for date-fns.","archived":false,"fork":false,"pushed_at":"2023-07-21T13:26:08.000Z","size":634,"stargazers_count":136,"open_issues_count":18,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T15:07:03.383Z","etag":null,"topics":["date","date-fns","time","time-zone","timezone"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-17T07:24:34.000Z","updated_at":"2024-10-13T03:51:22.000Z","dependencies_parsed_at":"2024-06-18T12:42:51.298Z","dependency_job_id":"0bebb762-8168-4e4e-a5ef-fb95002a945b","html_url":"https://github.com/prantlf/date-fns-timezone","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.07999999999999996,"last_synced_commit":"eeaeeb6b39edec021f37db5790b841055a05aa48"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fdate-fns-timezone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fdate-fns-timezone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fdate-fns-timezone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fdate-fns-timezone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/date-fns-timezone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208145,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","date-fns","time","time-zone","timezone"],"created_at":"2024-12-05T18:11:09.671Z","updated_at":"2025-04-04T16:14:25.907Z","avatar_url":"https://github.com/prantlf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# date-fns-timezone\n[![NPM version](https://badge.fury.io/js/date-fns-timezone.png)](http://badge.fury.io/js/date-fns-timezone)\n[![Build Status](https://travis-ci.org/prantlf/date-fns-timezone.png)](https://travis-ci.org/prantlf/date-fns-timezone)\n[![Coverage Status](https://coveralls.io/repos/github/prantlf/date-fns-timezone/badge.svg?branch=master)](https://coveralls.io/github/prantlf/date-fns-timezone?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4bb0f2ef6c1b4212a4ed2dbf1f3e8b29)](https://www.codacy.com/app/prantlf/date-fns-timezone?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=prantlf/date-fns-timezone\u0026amp;utm_campaign=Badge_Grade)\n[![Dependency Status](https://david-dm.org/prantlf/date-fns-timezone.svg)](https://david-dm.org/prantlf/date-fns-timezone)\n[![devDependency Status](https://david-dm.org/prantlf/date-fns-timezone/dev-status.svg)](https://david-dm.org/prantlf/date-fns-timezone#info=devDependencies)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nProvides parsing and formatting date strings and time zone conversions supporting [IANA time zones], following the design of functions in [date-fns]. List of canonical time zone names is provided by [timezone-support].\n\n### Table of Contents\n\n- [Synopsis](#synopsis)\n- [Installation and Getting Started](#installation-and-getting-started)\n- [Usage Scenarios](./docs/usage.md#usage-scenarios)\n- [API Reference](./docs/API.md#api-reference)\n- [Contributing](#contributing)\n- [Release History](#release-history)\n- [License](#license)\n\n## Synopsis\n\n```js\nconst { listTimeZones } = require('timezone-support')\nconst { parseFromTimeZone, formatToTimeZone } = require('date-fns-timezone')\n\n// List canonical time zone names: [ 'Africa/Abidjan', ... ]\nconst timeZones = listTimeZones()\n\n// Set the date to \"2018-09-01T16:01:36.386Z\"\nconst date = parseFromTimeZone('2018-09-01 18:01:36.386', { timeZone: 'Europe/Berlin' })\n\n// Set the output to \"1.9.2018 18:01:36.386 GMT+02:00 (CEST)\"\nconst date = new Date('2018-09-01Z16:01:36.386Z')\nconst format = 'D.M.YYYY HH:mm:ss.SSS [GMT]Z (z)'\nconst output = formatToTimeZone(date, format, { timeZone: 'Europe/Berlin' })\n```\n\n## Installation and Getting Started\n\nThis module can be installed in your project using [NPM] or [Yarn]. Make sure, that you use [Node.js] version 6 or newer.\n\n```sh\n$ npm i date-fns-timezone --save\n```\n\n```sh\n$ yarn add date-fns-timezone\n```\n\nFunctions are exposed as named exports from the package modules, for example:\n\n```js\nconst { parseFromTimeZone, formatToTimeZone } = require('date-fns-timezone')\n```\n\nYou can read more about the [module loading](./docs/API.md#loading) in other environments, like with ES6 or in web browsers. [Usage scenarios](./docs/usage.md#usage-scenarios) demonstrate applications of this library in typical real-world scenarios. The [API reference](./docs/API.md#api-reference) lists all functions with a description of their functionality.\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style.  Add unit tests for any new or changed functionality. Lint and test your code using Grunt.\n\n## Release History\n\n* 2018-10-10   v0.1.4   Fix compatibility with IE. Thanks, [Andrii](https://github.com/AndriiDidkivsky)!\n* 2018-10-06   v0.1.2   Add TypeScript export declarations.\n* 2018-09-19   v0.1.0   Add parseString without a time zone to cover a gap in date-fns\n* 2018-09-17   v0.0.1   Initial release\n\n## License\n\nCopyright (c) 2018 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[IANA time zones]: https://www.iana.org/time-zones\n[date-fns]: https://github.com/date-fns/date-fns\n[timezone-support]: https://github.com/prantlf/timezone-support\n[Node.js]: http://nodejs.org/\n[NPM]: https://www.npmjs.com/\n[Yarn]: https://yarnpkg.com/\n[RequireJS]: https://requirejs.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fdate-fns-timezone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fdate-fns-timezone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fdate-fns-timezone/lists"}