{"id":19241055,"url":"https://github.com/binocarlos/date-floor","last_synced_at":"2025-07-07T22:13:53.326Z","repository":{"id":15800615,"uuid":"18540041","full_name":"binocarlos/date-floor","owner":"binocarlos","description":"Like Math.floor but for Date objects","archived":false,"fork":false,"pushed_at":"2014-04-08T11:09:07.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-06T00:30:53.514Z","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/binocarlos.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":"2014-04-08T00:52:17.000Z","updated_at":"2014-05-06T14:02:14.000Z","dependencies_parsed_at":"2022-07-20T22:54:47.681Z","dependency_job_id":null,"html_url":"https://github.com/binocarlos/date-floor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fdate-floor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fdate-floor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fdate-floor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binocarlos%2Fdate-floor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binocarlos","download_url":"https://codeload.github.com/binocarlos/date-floor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240326654,"owners_count":19783883,"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-09T17:10:07.454Z","updated_at":"2025-02-23T14:27:44.027Z","avatar_url":"https://github.com/binocarlos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"date-floor\n==========\n\n![Build status](https://api.travis-ci.org/binocarlos/date-floor.png)\n\nLike Math.floor but for Date objects\n\n## installation\n\n```\n$ npm install date-floor\n```\n\n## usage\n\nTake a date any get back one that is the closest preceding:\n\n * year\n * month\n * day\n * hour\n * minute\n\n```js\nvar datefloor = require('date-floor');\n\nvar d = new Date('05/06/2014 11:56:45');\n\n\n// 01/01/2014 00:00:00\nvar year = datefloor(d, 'year');\n\n// 05/01/2014 00:00:00\nvar month = datefloor(d, 'month');\n\n// 05/06/2014 00:00:00\nvar day = datefloor(d, 'day');\n\n// 05/06/2014 11:00:00\nvar hour = datefloor(d, 'hour');\n\n// 05/06/2014 11:56:00\nvar minute = datefloor(d, 'minute');\n```\n\n## license\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fdate-floor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinocarlos%2Fdate-floor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinocarlos%2Fdate-floor/lists"}