{"id":15654758,"url":"https://github.com/nickstenning/recurring_event","last_synced_at":"2025-05-01T07:10:58.278Z","repository":{"id":387591,"uuid":"5058","full_name":"nickstenning/recurring_event","owner":"nickstenning","description":"RecurringEvent: A ruby library to aid in describing recurrent or patterned sets of dates.","archived":false,"fork":false,"pushed_at":"2008-03-26T21:28:52.000Z","size":88,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T21:04:45.064Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickstenning.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-03-23T11:37:43.000Z","updated_at":"2021-06-30T16:05:23.000Z","dependencies_parsed_at":"2022-07-07T13:33:01.355Z","dependency_job_id":null,"html_url":"https://github.com/nickstenning/recurring_event","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/nickstenning%2Frecurring_event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Frecurring_event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Frecurring_event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Frecurring_event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickstenning","download_url":"https://codeload.github.com/nickstenning/recurring_event/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251837350,"owners_count":21651760,"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-10-03T12:53:57.507Z","updated_at":"2025-05-01T07:10:58.238Z","avatar_url":"https://github.com/nickstenning.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RecurringEvent - An(other) implementation of Fowler's recurring event pattern.\n\nRecurringEvent is an attempt to make a more rubyish version of Martin Fowler's \nRecurring Event pattern, a la Runt. Where Runt has DIMonth, REYear, and so on, \nRecurringEvent has the following:\n\n    include RecurringEvent\n    expr = ( Day.in_month(1) | Day.range_each_month(21..28) )\n    expr \u0026= Month.range_each_year(1..6)\n\n    expr.include? Date.new( 2006, 01, 01 ) # =\u003e true\n    expr.include? Date.new( 2006, 01, 02 ) # =\u003e false\n    expr.include? Date.new( 2006, 04, 23 ) # =\u003e true\n    expr.include? Date.new( 2006, 07, 01 ) # =\u003e false\n    expr.include? Date.new( 2006, 07, 23 ) # =\u003e false\n\nIn case you didn't catch that, those two lines at the top set up a conditional \nexpression which will only #include? dates which are ((the first day of the \nmonth OR the 21st to 28th of the month) AND in January through to July).  But \nRecurringEvent goes further than that. Thanks to the hands-off fashion in \nwhich all this is achieved, we can mix in dates and date ranges with the \nRecurringEvent expressions:\n\n    include RecurringEvent\n\n    expr = Day.in_week(3) | Date.new(2006, 07, 04) \n    expr |= Date.new(2006,10,01)..Date.new(2006,10,15)\n\nThat expression will match every Wednesday, as well as Independence Day and \nthe 1st to 15th of August in 2006.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickstenning%2Frecurring_event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickstenning%2Frecurring_event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickstenning%2Frecurring_event/lists"}