{"id":19613886,"url":"https://github.com/webmatze/functional-date-time-helpers","last_synced_at":"2025-07-11T20:33:01.755Z","repository":{"id":57243020,"uuid":"56502918","full_name":"webmatze/functional-date-time-helpers","owner":"webmatze","description":"pure functional date time helpers","archived":false,"fork":false,"pushed_at":"2016-04-29T09:30:09.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-26T20:11:11.855Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webmatze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-18T11:39:48.000Z","updated_at":"2016-04-21T17:10:43.000Z","dependencies_parsed_at":"2022-09-15T01:34:21.418Z","dependency_job_id":null,"html_url":"https://github.com/webmatze/functional-date-time-helpers","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/webmatze/functional-date-time-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Ffunctional-date-time-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Ffunctional-date-time-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Ffunctional-date-time-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Ffunctional-date-time-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webmatze","download_url":"https://codeload.github.com/webmatze/functional-date-time-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Ffunctional-date-time-helpers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264341083,"owners_count":23593293,"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":[],"created_at":"2024-11-11T10:49:05.785Z","updated_at":"2025-07-11T20:33:01.735Z","avatar_url":"https://github.com/webmatze.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# functional-date-time-helpers\n\nStatus:\n[![npm version](https://img.shields.io/npm/v/functional-date-time-helpers.svg?style=flat-square)](https://www.npmjs.com/package/functional-date-time-helpers)\n[![npm downloads](https://img.shields.io/npm/dm/functional-date-time-helpers.svg?style=flat-square)](http://npm-stat.com/charts.html?package=functional-date-time-helpers\u0026from=2016-04-01)\n[![Codeship](https://codeship.com/projects/1bdd1ab0-e969-0133-6d7c-06e5be4c5162/status?branch=master)](https://codeship.com/projects/147603)\n\nfunctional-date-time-helpers are a few pure functions to manipulate date and time in your JavaScript projects. Think of it as a lightweight alternative to the date manipulation methods of [Moment.js](https://github.com/moment/moment/).\n\n## Usage (node)\n\nInstall through npm\n\n````\nnpm install --save functional-date-time-helpers\n````\n\nRequire the library and use the provided functions\n\n````javascript\nvar fdth = require('functional-date-time-helpers')\nvar threeMinutesInMilliseconds = fdth.minutes(3)\nvar now = new Date();\nvar treeMinutesAgo = fdth.subTime(threeMinutesInMilliseconds, now);\n````\n\n## Usage (browser)\n\nInstall using bower\n\n````\nbower install --save functional-date-time-helpers\n````\n\nInclude it to your html page\n\n````\n\u003cscript src=\"/path/to/dist/functional-date-time-helpers.browser.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n````\n\nUse the provided functions\n\n````javascript\nvar fdth = window.functionalDateTimeHelpers;\nvar now = new Date();\nvar inThreeDays = fdth.addTime(fdth.days(3), now);\n````\n\n## Performance\n\nOne of the goals of this library is to provide fast functions for date and time manipulation.\n\nWhile the popular [Moment.js](https://github.com/moment/moment/) is a great library with lots of functionality it has also some performance problems when manipulating date and time.\n\nThat is why I created functional-date-time-helpers with optimized functions that can give you a significant performance boost compared to the equivalent methods of [Moment.js](https://github.com/moment/moment/).\n\nI also included a benchmark suite that you can run to check the performance of each function.\n\nTo run the benchmark simply call this command:\n\n````\nnpm run perf\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmatze%2Ffunctional-date-time-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmatze%2Ffunctional-date-time-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmatze%2Ffunctional-date-time-helpers/lists"}