{"id":18038859,"url":"https://github.com/tsaohucn/conflict-calendars","last_synced_at":"2025-03-27T10:31:49.938Z","repository":{"id":62556147,"uuid":"80423025","full_name":"tsaohucn/conflict-calendars","owner":"tsaohucn","description":"The gem help you find the conflict calendars from calendars","archived":false,"fork":false,"pushed_at":"2017-12-13T16:59:04.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T13:36:38.213Z","etag":null,"topics":["algorithm","calendar","gem","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/tsaohucn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-30T13:18:58.000Z","updated_at":"2017-12-13T15:59:21.000Z","dependencies_parsed_at":"2022-11-03T06:00:27.650Z","dependency_job_id":null,"html_url":"https://github.com/tsaohucn/conflict-calendars","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/tsaohucn%2Fconflict-calendars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsaohucn%2Fconflict-calendars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsaohucn%2Fconflict-calendars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsaohucn%2Fconflict-calendars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsaohucn","download_url":"https://codeload.github.com/tsaohucn/conflict-calendars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222017199,"owners_count":16916925,"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":["algorithm","calendar","gem","ruby"],"created_at":"2024-10-30T14:06:44.315Z","updated_at":"2024-10-30T14:06:44.926Z","avatar_url":"https://github.com/tsaohucn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conflict Calendars\n\nThe gem help people find the conflicting calendars from given calendars\n\n## Welcome for PR\nThe gem need extend and raise, if you have any interests, welocome pull request.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'conflict-calendars'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install conflict-calendars\n\n## Usage\nRequire the library first\n\n```ruby\nrequire \"conflict/calendars\"\n```\n\nCreate calendar object by this way, you can type the name of calendar or not.\n\n```ruby\ncalendar_A = Ccs::Calendar.new(\"enter the name of calendar\", ,\"2016-12-10 08:00\", \"2016-12-10 13:00\")\ncalendar_B = Ccs::Calendar.new(\"2016-12-10 09:00\", \"2016-12-10 10:30\")\ncalendar_C = Ccs::Calendar.new(\"2016-12-10 10:00\", \"2016-12-10 12:30\")\ncalendar_D = Ccs::Calendar.new(\"2016-12-10 15:00\", \"2016-12-10 17:30\")\ncalendar_E = Ccs::Calendar.new(\"2016-12-10 15:20\", \"2016-12-10 16:30\")\n```\nOver here we have five calendars, we wanna know who are conflicting? \nSo we just do that :\n\n```ruby\nconflicts = Ccs::Conflict.new(calendar_A,calendar_B,calendar_C,calendar_D,calendar_E)\n\np conflicts #=\u003e \u003cCcs::Conflict:0x007fba211e9d20 {2}\u003e\n\nputs conflicts.size #=\u003e 2\n```\n\nNow, you know there are exist two conflicting sets.\nThen you can get each information of calendar by this way :\n\n```ruby\nconflicts.each do |conflict|\n  p conflict #=\u003e \u003cSet: {#\u003cCcs::Calendar:0x007fb..\u003e, #\u003cCcs::Calendar:0x007fc..\u003e} \u003e\n  conflict.each do |calendar|\n    p calendar #=\u003e \u003cCcs::Calendar\u003e\n    puts calendar.calendarname #=\u003e \"calendarname\"\n    puts calendar.stime #=\u003e 2016-12-10 09:00\n    puts calendar.etime #=\u003e 2016-12-10 10:30\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/conflict-calendars. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsaohucn%2Fconflict-calendars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsaohucn%2Fconflict-calendars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsaohucn%2Fconflict-calendars/lists"}