{"id":23950009,"url":"https://github.com/jameshulse/mr-time","last_synced_at":"2026-04-12T01:36:25.983Z","repository":{"id":57303803,"uuid":"105290189","full_name":"jameshulse/mr-time","owner":"jameshulse","description":"Tiny fluent time conversions package for better code readability","archived":false,"fork":false,"pushed_at":"2018-01-04T17:06:15.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T16:44:06.713Z","etag":null,"topics":["fluent-api","javascript","node","node-js","node-module","node-modules","nodejs","npm","readability","small-tools","time"],"latest_commit_sha":null,"homepage":"","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/jameshulse.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}},"created_at":"2017-09-29T15:48:12.000Z","updated_at":"2017-09-29T16:40:50.000Z","dependencies_parsed_at":"2022-08-24T17:11:45.655Z","dependency_job_id":null,"html_url":"https://github.com/jameshulse/mr-time","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshulse%2Fmr-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshulse%2Fmr-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshulse%2Fmr-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshulse%2Fmr-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jameshulse","download_url":"https://codeload.github.com/jameshulse/mr-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240449772,"owners_count":19803122,"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":["fluent-api","javascript","node","node-js","node-module","node-modules","nodejs","npm","readability","small-tools","time"],"created_at":"2025-01-06T11:54:00.242Z","updated_at":"2025-10-27T00:44:07.553Z","avatar_url":"https://github.com/jameshulse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/jameshulse/mr-time.svg?branch=master)](https://travis-ci.org/jameshulse/mr-time) [![Coverage Status](https://coveralls.io/repos/github/jameshulse/mr-time/badge.svg?branch=master)](https://coveralls.io/github/jameshulse/mr-time?branch=master) [![npm](https://img.shields.io/npm/v/mr-time.svg)](https://www.npmjs.com/package/mr-time)\n\n# Mr. Time 👨🏻🕑\n\n### Description\nMr. Time provides better code readibility than random numbers representing amounts of time scattered through your code.\n\nEver needed to provide a timeout to a function call and had to google 'How many milliseconds in 24 hours'. Your options are:\n\n#### Bad\n\n```javascript\nsetTimeout(myMethod, 86400000); // Nobody will have any idea how long this is\n```\n\n#### Better\n\n```javascript\nconst TWENTY_FOUR_HOURS_IN_MILLISECONDS = 86400000; // I still had to google to get this number first...\n\nsetTimeout(myMethod, TWENTY_FOUR_HOURS_IN_MILLISECONDS);\n```\n\n#### ⭐ Best⭐\n\n```javascript\nlet T = require('mr-time');\n\nsetTimeout(myMethod, T(24).hours.in.milliseconds); // No googling, easy to read, everyones happy\n```\n\n### Installation\n`npm install mr-time`\n  \n`yarn add mr-time`\n  \n### Usage\n```javascript\nlet T = require('mr-time');\n  \nlet oneDayInMilliseconds = T(1).days.in.milliseconds; // returns 86400000\nlet twoWeeksInSeconds = T(2).weeks.in.seconds; // returns 1210000\n```\n\n### Upcoming\n\n- Add month, year, decade, century, nanoseconds etc\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameshulse%2Fmr-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameshulse%2Fmr-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameshulse%2Fmr-time/lists"}