README.md in add_to_calendar-0.2.5 vs README.md in add_to_calendar-0.3.0
- old
+ new
@@ -76,14 +76,15 @@
title: "Ruby Conference", # required
timezone: 'America/New_York', # required
location: "20 W 34th St, New York, NY 10001",
url: "https://www.ruby-lang.org/en/",
description: "Join us to learn all about Ruby.",
- add_url_to_description: true # defaults to true
+ add_url_to_description: true # defaults to true,
+ all_day: true # defaults to false
}
-cal = AddToCalendar::URLs.new(event_attributes)
+cal = AddToCalendar::URLs.new(**event_attributes)
```
| Attribute | Required? | Class | Notes |
| -----------------------|-----------|------------|-------|
| start_datetime | Yes | Time | |
@@ -91,10 +92,11 @@
| title | Yes | String | |
| timezone | Yes | String | Must be in [tz database format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) Eg. 'Europe/London', 'America/New_York' |
| location | No | String | |
| url | No | String | Most providers do not have a native URL field. If you set `url` it will be added to the end of the description field (see `add_url_to_description`) |
| description | No | String | Accepts newlines by passing `\n` Eg. `"Join us for fun & drinks\n\nPS. Smart casual"` |
-| add_url_to_description | No | true/false | defaults to `true`. Set `add_url_to_description: false` to stop the URL from being added to the description |
+| add_url_to_description | No | true/false | Defaults to `true`. Set `add_url_to_description: false` to stop the URL from being added to the description |
+| all_day | No | true/false | <ul><li>Defaults to `false`.</li><li>When set to `true` the times will be ignored.</li><li>If no end_datetime provided it will be a single day event.</li><li>When providing end_datetime, use the final day of the event (eg. 1 day event start: 2023-05-01, end: 2023-05-01; 3 day event start: 2023-05-01, end: 2023-05-03).</li><li>Some calendars require you to specify the _day after_ as the end date which feels counterintuitive, this Gem takes care of that for you.</li></ul> |
### Timezones and offsets
- Offset values eg. "2020-05-13 15:31:00 **+05:00**" are ignored. It is only important that you have the correct date and time numbers set. The timezone is set directly using its own attribute `timezone`.
- You must set a timezone so that when users add the event to their calendar it shows at their correct local time.