{"id":16439089,"url":"https://github.com/saintplay/are-intervals-overlapping","last_synced_at":"2026-05-13T08:32:32.300Z","repository":{"id":57183422,"uuid":"113874864","full_name":"saintplay/are-intervals-overlapping","owner":"saintplay","description":"Check if two date intervals are overlapping","archived":false,"fork":false,"pushed_at":"2017-12-13T14:08:14.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T11:33:52.303Z","etag":null,"topics":["collision","date-fns","date-range","dates","intervals","overlapping"],"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/saintplay.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-12-11T15:21:03.000Z","updated_at":"2021-05-17T07:32:32.000Z","dependencies_parsed_at":"2022-09-14T06:11:11.916Z","dependency_job_id":null,"html_url":"https://github.com/saintplay/are-intervals-overlapping","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saintplay%2Fare-intervals-overlapping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saintplay%2Fare-intervals-overlapping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saintplay%2Fare-intervals-overlapping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saintplay%2Fare-intervals-overlapping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saintplay","download_url":"https://codeload.github.com/saintplay/are-intervals-overlapping/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240756319,"owners_count":19852540,"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":["collision","date-fns","date-range","dates","intervals","overlapping"],"created_at":"2024-10-11T09:07:50.705Z","updated_at":"2026-05-13T08:32:27.279Z","avatar_url":"https://github.com/saintplay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# are-intervals-overlapping\n\n\u003e Check if two intervals are overlapping - Logic from date-fns\n\n## Install ##\n\n    npm install --save are-intervals-overlapping\n\nor\n\n    yarn add are-intervals-overlapping\n\n\n## Usage ##\n\n```js\nvar areIntervalsOverlappings = require('are-intervals-overlapping');\n// or\nimport areIntervalsOverlappings from 'are-intervals-overlapping';\n\n// For overlapping time intervals:\nareIntervalsOverlapping(\n  {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n  {start: new Date(2014, 0, 17), end: new Date(2014, 0, 21)}\n)\n//=\u003e true\n\n// For non-overlapping time intervals:\nareIntervalsOverlapping(\n  {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n  {start: new Date(2014, 0, 21), end: new Date(2014, 0, 22)}\n)\n//=\u003e false\n\n// Using the inclusive option:\nareIntervalsOverlapping(\n  {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n  {start: new Date(2014, 0, 20), end: new Date(2014, 0, 24)}\n)\n//=\u003e false\n\nareIntervalsOverlapping(\n  {start: new Date(2014, 0, 10), end: new Date(2014, 0, 20)},\n  {start: new Date(2014, 0, 20), end: new Date(2014, 0, 24)},\n  {inclusive: true}\n)\n//=\u003e true\n```\n\n## License ##\n\nMIT © [Diego Jara](saintplay96@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaintplay%2Fare-intervals-overlapping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaintplay%2Fare-intervals-overlapping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaintplay%2Fare-intervals-overlapping/lists"}