Skip to content

wadearnold/recurring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recurring

Simple golang rest server to get a list of recurring dates utulzing rrule

go run ./cmd/server.go 
Recurring Server is listening on port 8080...
2024/07/22 17:28:51 Received JSON: {Frequency:monthly Until:0001-01-01 00:00:00 +0000 UTC Count:12 WeekDays:[] Interval:1 Month:0 Pos:0 Day:1}
wadearnold@mb recurring % curl -X POST -d '{"frequency": "monthly", "interval": 1, "day": 1, "count":12}' http://localhost:8080/recurrings
{"rRule":"RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=12;BYMONTHDAY=1",
"occurrences":["2024-08-01T23:26:09Z","2024-09-01T23:26:09Z","2024-10-01T23:26:09Z","2024-11-01T23:26:09Z","2024-12-01T23:26:09Z","2025-01-01T23:26:09Z","2025-02-01T23:26:09Z","2025-03-01T23:26:09Z","2025-04-01T23:26:09Z","2025-05-01T23:26:09Z","2025-06-01T23:26:09Z","2025-07-01T23:26:09Z"],
"recurring":{"frequency":"monthly","until":"0001-01-01T00:00:00Z","count":12,"interval":1,"day":1}}

examples:

Recurring Daily; Repeat every 1 day(s); Run until it reaches 36 occurrences

  "recurring": {
    "frequency": "daily",
    "count": 12,
    "interval": 1,
    }

Recurring Weekly; Repeat every 2 week(s) on FR ; Never stop;

  "recurring": {
    "frequency": "weekly",
    "WeekDays": ["FR"],
    "interval": 2,
    }

Recurring Monthly; Repeat every 1 month(s) on the First; Run until: 2050-07-21

  "recurring": {
    "frequency": "monthly",
    "until": "2050-07-21",
    "interval": 1,
    }

Research

RRule

https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10

https://datatracker.ietf.org/doc/html/rfc5545

Go implementations

https://github.com/efficap-energie/rrule-go

https://github.com/teambition/rrule-go

https://github.com/graham/rrule

rrule.js

https://github.com/jkbrzt/rrule

https://www.nylas.com/blog/create-recurring-events-using-rrule-dev/

jQuery Recurring Rule

https://demo.mobiscroll.com/jquery/datetime/recurring-values#

RSchedule: a javascript recurring events library

https://medium.com/@john.carroll.p/rschedule-a-javascript-recurring-dates-library-36b4a279a4ca

https://codesandbox.io/s/rschedule-starter-pxezu?fontsize=14&module=/src/index.ts&file=/src/index.ts

https://gitlab.com/john.carroll.p/rschedule

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages