{"id":13726649,"url":"https://github.com/dmtrKovalenko/reason-date-fns","last_synced_at":"2025-05-07T22:30:26.536Z","repository":{"id":35433100,"uuid":"203587221","full_name":"dmtrKovalenko/reason-date-fns","owner":"dmtrKovalenko","description":"Reason binding for date-fns/fp. Curried by default :3","archived":false,"fork":false,"pushed_at":"2025-04-26T02:43:27.000Z","size":191,"stargazers_count":45,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T23:38:03.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Reason","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/dmtrKovalenko.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,"zenodo":null}},"created_at":"2019-08-21T13:12:36.000Z","updated_at":"2025-04-26T02:43:30.000Z","dependencies_parsed_at":"2023-01-15T21:05:37.165Z","dependency_job_id":"2f3cb725-1697-4fe7-b297-1639959661fd","html_url":"https://github.com/dmtrKovalenko/reason-date-fns","commit_stats":{"total_commits":297,"total_committers":5,"mean_commits":59.4,"dds":"0.31986531986531985","last_synced_commit":"d04891aceda1e10b46ea59f8b1d50c9953587c20"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Freason-date-fns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Freason-date-fns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Freason-date-fns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Freason-date-fns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmtrKovalenko","download_url":"https://codeload.github.com/dmtrKovalenko/reason-date-fns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251800995,"owners_count":21645966,"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-08-03T01:03:15.701Z","updated_at":"2025-05-07T22:30:26.228Z","avatar_url":"https://github.com/dmtrKovalenko.png","language":"Reason","funding_links":[],"categories":["Reason"],"sub_categories":[],"readme":"# Reason bindings for date-fns v2\n\nThis is a project with ReasonML bindings for [date-fns v2](https://date-fns.org/docs/Getting-Started). These bindings are using `FP` module of date-fns. So please refer the [FP documentation](https://date-fns.org/v2.0.0/docs/FP-Guide). In short: all methods are curried and date value is always last argument (`|\u003e`).\n\n\u003e Tip: On date-fns documentation you can choose `submodule` in the top right corner and view documentation and function signatures just like you would use it in reason. [Here](https://date-fns.org/v2.15.0/docs/fp/format) is an example of `FP` submodule docs page.\n\n![Date-fns docs site submodule toggle](https://user-images.githubusercontent.com/16926049/91631817-3f7a8c80-e9e5-11ea-96a5-9544350fa8d8.png)\n\nSimple example:\n\n```ocaml\nopen ReasonDateFns;\n\nJs.Date.make()\n|\u003e DateFns.addDays(2)\n|\u003e DateFns.addDays(-2)\n|\u003e DateFns.closestTo([|\n     DateFns.parseISO(\"2019-08-21T13:00:03.058Z\"),\n     Js.Date.make(),\n   |])\n|\u003e DateFns.lightFormat(\"YYYY-MM-DD\");\n\nJs.Date.make()\n|\u003e DateFns.formatWithOptions(\n     DateFns.formatOptions(~locale=DateFns.Locales.ru, ()),\n     \"YYYY-MM-DD\",\n   );\n\nJs.Date.make()\n|\u003e DateFns.addMinutes(10.)\n|\u003e DateFns.addSeconds(10.)\n|\u003e DateFns.addMilliseconds(1000)\n```\n\nHave a fun with FP 👨‍💻\n\n## Installation \n\nMake sure that you need `date-fns` **v2**.\n\n```\nyarn add reason-date-fns\n```\n\nAnd add `reason-date-fns` to your `bsconfig.json` \n\n```json\n{\n  \"bs-dependencies\": [\n    \"reason-date-fns\"\n  ],\n}\n```\n\n## Differences from bs-date-fns\n\nThere are 2:\n1) This project is exporting to `date-fns` of v2\n2) And using `FP` submodule. So currying is enabled by default 😎\n\n \n## License\nThis project is under the terms of MIT license \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdmtrKovalenko%2Freason-date-fns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FdmtrKovalenko%2Freason-date-fns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FdmtrKovalenko%2Freason-date-fns/lists"}