{"id":17130891,"url":"https://github.com/maxrimue/tizo","last_synced_at":"2025-03-24T04:46:32.701Z","repository":{"id":91566556,"uuid":"130910430","full_name":"maxrimue/tizo","owner":"maxrimue","description":"easily parse and convert any string containing hours, minutes and timezone","archived":false,"fork":false,"pushed_at":"2019-12-29T12:57:20.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T14:58:02.470Z","etag":null,"topics":["converter","parser","timezones"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/maxrimue.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-04-24T20:32:06.000Z","updated_at":"2023-03-10T10:12:58.000Z","dependencies_parsed_at":"2023-04-25T18:24:03.417Z","dependency_job_id":null,"html_url":"https://github.com/maxrimue/tizo","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.09677419354838712,"last_synced_commit":"7b597378a5965a2be4889fde0497e73adfefd653"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Ftizo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Ftizo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Ftizo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Ftizo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxrimue","download_url":"https://codeload.github.com/maxrimue/tizo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212176,"owners_count":20578440,"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":["converter","parser","timezones"],"created_at":"2024-10-14T19:13:29.897Z","updated_at":"2025-03-24T04:46:32.676Z","avatar_url":"https://github.com/maxrimue.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tizo [![Build Status](https://travis-ci.com/maxrimue/tizo.svg?branch=master)](https://travis-ci.com/maxrimue/tizo) [![Greenkeeper badge](https://badges.greenkeeper.io/maxrimue/tizo.svg)](https://greenkeeper.io/)\n\n\u003e convert a string with hours to any timezone\n\n## Install\n\n```\n$ npm install tizo\n```\n\n## Usage\n\n```js\nconst tizo = require(\"tizo\").default;\n// or\nimport tizo from 'tizo';\n\ntizo(\"19:30 CEST\").utc;\n// → '[ 17, 30 ]'\n\ntizo(\"9pm\").original;\n// → '[ 21, 0 ]'\n\ntizo(\"08:21\").local;\n// → '[ 8 + local offset, 21 + local offset ]'\n```\n\n- supports many different, popular timezones, including summer/winter adaptions\n- automatically parses 'am' and 'pm' for time formatting\n- doesn't require internet connection for any lookup\n- flexible formatting (eg `sss01:02 aM CesT sss` → `[1, 2, 'am', 'cest']`)\n- returns local, utc (gmt) and parsed time\n\n## API\n\n### tizo(input)\n\n#### input\n\nType: `string`\n\nAny string containing at least a specific hour, and additionally minutes, and optionally am/pm and/or timezone\n\n#### returns\n\nType `object`\n\n##### original\n\nType: `array`\n\nOriginal, parsed time in `[ hours, minutes ]`\n\n#### utc\n\nType: `array`\n\nUTC/GMT time in `[ hours, minutes ]`\n\n#### local\n\nType: `array`\n\nLocal time in `[ hours, minutes ]`\n\n#### timezones\n\nType: `object`\n\nList of supported timezones in `\u003ctimezone key\u003e: { offset: \u003coffset\u003e, name: \u003cspelled out name\u003e }`.\nSee examples in the [timezones.ts](timezones.ts) file.\n\n- `timezone key`: abbreviated name of timezone, eg \"cest\"\n- `offset`: positive or negative integer or [integer, integer] representing the timezone's offset\n- `spelled out name`: full name of the timezone, eg \"Central European Summer Time\"\n\n## Related\n\n- [tizo-cli](https://github.com/maxrimue/tizo-cli) - CLI version of this module\n\n## License\n\nMIT © [maxrimue](http://github.com/maxrimue)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrimue%2Ftizo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxrimue%2Ftizo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrimue%2Ftizo/lists"}