{"id":19780843,"url":"https://github.com/guyisra/tyme","last_synced_at":"2025-07-30T14:10:50.575Z","repository":{"id":46932378,"uuid":"126135674","full_name":"guyisra/tyme","owner":"guyisra","description":"Convert any time unit to any time unit, ever!","archived":false,"fork":false,"pushed_at":"2022-12-07T10:34:39.000Z","size":479,"stargazers_count":4,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T06:44:49.678Z","etag":null,"topics":[],"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/guyisra.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-21T06:50:17.000Z","updated_at":"2018-03-29T11:35:51.000Z","dependencies_parsed_at":"2023-01-24T16:45:43.571Z","dependency_job_id":null,"html_url":"https://github.com/guyisra/tyme","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/guyisra/tyme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyisra%2Ftyme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyisra%2Ftyme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyisra%2Ftyme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyisra%2Ftyme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guyisra","download_url":"https://codeload.github.com/guyisra/tyme/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyisra%2Ftyme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267881146,"owners_count":24159837,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T05:41:24.116Z","updated_at":"2025-07-30T14:10:50.518Z","avatar_url":"https://github.com/guyisra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tyme\n\u003e Converting any time unit to any time unit\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads Stats][npm-downloads]][npm-url]\n\nSometimes you want to convert hours to seconds. Something you want to know how many\nweeks are in a decade. And sometimes, you want to know how many blinks of an eye are in a day...\n\n## Installation\n\n\n```sh\nnpm install tyme --save\n```\n\n## Usage example\n\n```javascript\nconst tyme = require('tyme')\ntyme.hours(5).inSeconds() // 18000\ntyme.decades(1).inWeeks() // 521.4285714285714 \n```\n\nAlso exposes the timeunit methods directly\n\n```javascript\nconst {hours, minutes} = require('tyme')\nhours(3).inDays() // 0.125\nminutes(60).inHours() // 1\n```\n\n## Supported Time Units\n\n|Name|Symbol|Value|\n|----|----|----|\n|millisecond|ms|0.001s||hectosecond|hs|1m + 40s|\n|killosecond|ks|16m + 40s|\n|megasecond|Ms|11d + 13h + 46m + 40s|\n|gigasecond|Gs|31Y + 287d|\n|terasecond|Ts|31600Y|\n|second|s|1s|\n|minute|m|60s|\n|hour|h|60m|\n|day|d|24h|\n|week|w|7d|\n|month|M|31d|\n|year|Y|365d|\n|decade|D|10Y|\n\n\n## Development setup\n\n\n```sh\nyarn install \nyarn test\n```\n\n## Release History\n\nsee changelog.md\n\n## Meta\n\nGuy Israeli – [@isguyra](https://twitter.com/isguyra)\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[https://github.com/guyisra/tyme](https://github.com/guyisra/tyme)\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/guyisra/tyme\u003e)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\n[npm-image]: https://img.shields.io/npm/v/tyme.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/tyme\n[npm-downloads]: https://img.shields.io/npm/dm/tyme.svg?style=flat-square\n[travis-image]: https://img.shields.io/travis/guyisra/tyme/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/guyisra/tyme","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyisra%2Ftyme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguyisra%2Ftyme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyisra%2Ftyme/lists"}