Skip to content

Parse an RRULE from the iCalendar RFC-2445 and expand into a usable struct.

License

Notifications You must be signed in to change notification settings

jakecurreri/rrulex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RRulex

Hex.pm Documentation

RRulex is an Elixir package that parses an RRULE from the iCalendar RFC-2445 and expands into a usable struct.

This Hex package is an extension of Austin Hammer's RRulex that unfortunately never made it to distribution.

Getting Started

Add :rrulex to the list of dependencies in mix.exs:

def deps do
  [
    {:rrulex, "~> 0.1.0"}
  ]
end

Here's a few simple examples:

> use RRulex
> RRulex.parse("FREQ=DAILY")
%RRulex{
  by_day: [],
  by_hour: [],
  by_minute: [],
  by_month: [],
  by_month_day: [],
  by_second: [],
  by_set_pos: [],
  by_week_number: [],
  by_year_day: [],
  count: nil,
  frequency: :daily,
  interval: nil,
  until: nil,
  week_start: nil
}

> RRulex.parse("INTERVAL=2;FREQ=WEEKLY;BYDAY=FR;COUNT=6")
%RRulex{
  by_day: [:friday],
  by_hour: [],
  by_minute: [],
  by_month: [],
  by_month_day: [],
  by_second: [],
  by_set_pos: [],
  by_week_number: [],
  by_year_day: [],
  count: 6,
  frequency: :weekly,
  interval: 2,
  until: nil,
  week_start: nil
}

License

This software is licensed under the MIT license

About

Parse an RRULE from the iCalendar RFC-2445 and expand into a usable struct.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages