{"id":13878612,"url":"https://github.com/square/ruby-rrule","last_synced_at":"2025-06-13T01:39:06.406Z","repository":{"id":21815633,"uuid":"93548910","full_name":"square/ruby-rrule","owner":"square","description":"RRULE expansion for Ruby","archived":false,"fork":false,"pushed_at":"2024-05-09T20:24:58.000Z","size":157,"stargazers_count":171,"open_issues_count":10,"forks_count":24,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-17T14:57:59.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/square.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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}},"created_at":"2017-06-06T18:09:55.000Z","updated_at":"2024-09-26T07:09:32.000Z","dependencies_parsed_at":"2024-01-13T20:32:55.466Z","dependency_job_id":"0b340012-c1a9-4197-8ef0-50c9b0e74edf","html_url":"https://github.com/square/ruby-rrule","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fruby-rrule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fruby-rrule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fruby-rrule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fruby-rrule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/square","download_url":"https://codeload.github.com/square/ruby-rrule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226138849,"owners_count":17579496,"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-06T08:01:54.751Z","updated_at":"2024-11-24T07:31:09.908Z","avatar_url":"https://github.com/square.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# rrule\n\n## Description\n\nrrule is a minimalist library for expanding RRULEs, with a goal of being fully compliant with [iCalendar spec](https://tools.ietf.org/html/rfc2445).\n\n## Examples\n\nTo install this gem, add it to your Gemfile:\n\n```ruby\ngem 'rrule'\n```\n\nCreate an rrule with an RRULE string:\n\n```ruby\nrrule = RRule::Rule.new('FREQ=DAILY;COUNT=3')\nrrule = RRule.parse('FREQ=DAILY;COUNT=3') # alternate syntax\n```\n\n### Generating recurrence instances\n\nEither generate all instances of a recurrence, or generate instances in a range:\n\n```ruby\nrrule.all\n=\u003e [2016-06-23 16:45:32 -0700, 2016-06-24 16:45:32 -0700, 2016-06-25 16:45:32 -0700]\nrrule.between(Time.new(2016, 6, 23), Time.new(2016, 6, 24))\n=\u003e [2016-06-23 16:45:32 -0700]\n```\n\nYou can generate all instances starting from a specified date with the `#from` method:\n\n```ruby\nrrule = RRule::Rule.new('FREQ=DAILY;COUNT=3', dtstart: Time.new(2016, 1, 1))\nrrule.all\n=\u003e [2016-01-01 16:45:32 -0700, 2016-01-02 16:45:32 -0700, 2016-01-03 16:45:32 -0700]\nrrule.from(Time.new(2016, 1, 2))\n=\u003e [2016-01-02 16:45:32 -0700, 2016-01-03 16:45:32 -0700]\n```\n\nYou can limit the number of instances that are returned with the `limit` option:\n\n```ruby\nrrule = RRule::Rule.new('FREQ=DAILY;COUNT=3')\nrrule.all(limit: 2)\n=\u003e [2016-06-23 16:45:32 -0700, 2016-06-24 16:45:32 -0700]\n```\n\nBy default the DTSTART of the recurrence is the current time, but this can be overriden with the `dtstart` option:\n\n```ruby\nrrule = RRule::Rule.new('FREQ=DAILY;COUNT=3', dtstart: Time.new(2016, 7, 1))\nrrule.all\n=\u003e [2016-07-01 00:00:00 -0700, 2016-07-02 00:00:00 -0700, 2016-07-03 00:00:00 -0700]\n```\n\nUnless your rrule should be evaluated in UTC time, you should also pass an explicit timezone in the `tzid` option to ensure that daylight saving time boundaries are respected, etc.:\n\n```ruby\nrrule = RRule::Rule.new('FREQ=DAILY;COUNT=3', dtstart: Time.new(2016, 7, 1), tzid: 'America/Los_Angeles')\n```\n\n### Exceptions (EXDATEs)\n\nTo define exception dates, pass the `exdate` option:\n\n```ruby\nrrule = RRule::Rule.new('FREQ=DAILY;COUNT=3', dtstart: Time.new(2016, 7, 1), exdate: [DateTime.parse('2016-07-02 00:00:00 -0700'])\nrrule.all\n=\u003e [2016-07-01 00:00:00 -0700, 2016-07-03 00:00:00 -0700]\n```\n\n## License\n\nCopyright 2018 Square Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare%2Fruby-rrule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquare%2Fruby-rrule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare%2Fruby-rrule/lists"}