{"id":15654486,"url":"https://github.com/julienbreux/rrule-go","last_synced_at":"2026-01-11T23:53:47.252Z","repository":{"id":57519718,"uuid":"82465426","full_name":"JulienBreux/rrule-go","owner":"JulienBreux","description":"Go library for working with recurrence rules for calendar dates.","archived":false,"fork":false,"pushed_at":"2017-02-22T17:16:16.000Z","size":12,"stargazers_count":26,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T21:03:20.324Z","etag":null,"topics":["calendar","golang","golang-library","icalendar-rfc","recurrence-rules","rrule"],"latest_commit_sha":null,"homepage":"","language":"Go","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/JulienBreux.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-02-19T14:37:44.000Z","updated_at":"2023-12-18T19:50:32.000Z","dependencies_parsed_at":"2022-09-14T12:31:27.444Z","dependency_job_id":null,"html_url":"https://github.com/JulienBreux/rrule-go","commit_stats":null,"previous_names":["julienbreux/rrule"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreux%2Frrule-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreux%2Frrule-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreux%2Frrule-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulienBreux%2Frrule-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulienBreux","download_url":"https://codeload.github.com/JulienBreux/rrule-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251815130,"owners_count":21648364,"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":["calendar","golang","golang-library","icalendar-rfc","recurrence-rules","rrule"],"created_at":"2024-10-03T12:52:01.638Z","updated_at":"2026-01-11T23:53:47.203Z","avatar_url":"https://github.com/JulienBreux.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"rrule.go\n========\n\n[![Build Status](https://travis-ci.org/JulienBreux/rrule-go.svg?branch=master)](https://travis-ci.org/JulienBreux/rrule-go) [![Coverage Status](https://coveralls.io/repos/github/JulienBreux/rrule-go/badge.svg?branch=master)](https://coveralls.io/github/JulienBreux/rrule-go?branch=master)\n\n**Go library for working with recurrence rules for calendar dates.**\n\nInspired by the amazing [rrule.js](https://github.com/jkbrzt/rrule).\n\n* * * * *\n\n### Quick Start\n\n#### Installation\n\nThe only requirement is the [Go Programming Language](https://golang.org/dl/), at least 1.8\n\n```bash\n$ go get github.com/JulienBreux/rrule\n```\n\n#### Overview\n\n##### RRule\n\n```go\n// Create a rule\nrule := rrule.RRule{\n\tfreq:      rrule.WEEKLY,\n\tinterval:  5,\n\tbyweekday: [rrule.MO, rrule.FR],\n\tdtstart:   time.Date(2017, time.January, 1, 10, 30, 0, 0, time.UTC),\n\tuntil:     time.Date(2017, time.December, 31, 10, 30, 0, 0, time.UTC),\n}\n\n// Get all occurrence dates (Date instances)\nrule.All()\n\n// Get a slice of occurrence dates (Date instances)\nrule.Between(\n\ttime.Date(2017, time.August, 1, 10, 30, 0, 0, time.UTC),\n\ttime.Date(2017, time.September, 1, 10, 30, 0, 0, time.UTC),\n)\n\n// Get an iCalendar RRULE string representation:\n// The output can be used with RRule.FromString(\"...\").\nrule.ToString()\n```\n\n##### RRuleSet\n\n```go\n// Create a rule set\nset := rrule.RRuleSet{}\n\n// Add a rule to set\nset.RRule(\n\trrule.RRule{\n\t\tfreq:    rrule.MONTHLY,\n\t\tcount:   2,\n\t\tdtstart: time.Date(2017, time.January, 1, 10, 30, 0, 0, time.UTC),\n\t}\n)\n\n// Add an exclusion rule to set\nset.ExRule(\n\trrule.RRule{\n\t\tfreq:    rrule.MONTHLY,\n\t\tcount:   2,\n\t\tdtstart: time.Date(2017, time.February, 1, 10, 30, 0, 0, time.UTC),\n\t}\n)\n\n// Add a date to set\nset.RDate(time.Date(2017, time.June, 1, 10, 30, 0, 0, time.UTC))\n\n// Add an another date to set\nset.RDate(time.Date(2017, time.June, 2, 10, 30, 0, 0, time.UTC))\n\n// Add an exclusion date to set\nset.ExDate(time.Date(2017, time.May, 1, 10, 30, 0, 0, time.UTC))\n\n// Get all occurrence dates (Date instances)\nset.All()\n\n// Get a slice of occurrence dates (Date instances)\nset.Between(\n\ttime.Date(2017, time.February, 1, 10, 30, 0, 0, time.UTC),\n\ttime.Date(2017, time.June, 2, 10, 30, 0, 0, time.UTC),\n)\n\n// Array of strings (e.g. [\"RRULE:...\", \"RDATE:...\", \"EXRULE:...\", \"EXDATE:...\"])\nset.ValueOf()\n\n// To string (array stringified) (e.g. \"[\"RRULE:...\", \"RDATE:...\", \"EXRULE:...\", \"EXDATE:...\"]\")\nset.ToString()\n```\n\n##### RRule parser\n\n```go\n// Parse a RRule string, to a RRule instance\nrrule.StrToRule(\"RRULE:FREQ=MONTHLY;COUNT=5;DTSTART=20170201T023000Z\")\n\n// Parse a RRule string, to a RRuleSet instance\nrrule.StrToRuleSet(\"RRULE:FREQ=MONTHLY;COUNT=5;DTSTART=20170201T023000Z\")\n\n// Parse a RRuleSet string, to a RRuleSet instance\nrrule.StrToRuleSet(\n\t\"RRULE:FREQ=MONTHLY;COUNT=5;DTSTART=20170201T023000Z\\n\"+\n\t\t\"RDATE:20170701T023000Z,20170702T023000Z\\n\"+\n\t\t\"EXRULE:FREQ=MONTHLY;COUNT=2;DTSTART=20170301T023000Z\\n\"+\n\t\t\"EXDATE:20170601T023000Z\")\n```\n\n#### Authors\n\n* [Julien Breux](https://julienbreux.uk/) ([@JulienBreux](http://twitter.com/JulienBreux))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienbreux%2Frrule-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulienbreux%2Frrule-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulienbreux%2Frrule-go/lists"}