summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Meringdal <fmeringdal@hotmail.com>2020-10-26 23:57:54 +0100
committerFredrik Meringdal <fmeringdal@hotmail.com>2020-10-26 23:57:54 +0100
commite04c3bb8f58e7addd4b4ce4ecb45d44ea0fc45b3 (patch)
treec6747a00b6b3334d95ecacf3033a3310b5efa4b1
parent02cd1778aa330564b764751f9c8be8e67a46a821 (diff)
downloadrust_rrule-e04c3bb8f58e7addd4b4ce4ecb45d44ea0fc45b3.zip
readme quick start
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 5a62e4d..7e1ea73 100644
--- a/README.md
+++ b/README.md
@@ -6,18 +6,18 @@
<a href="https://crates.io/crates/rrule"><img src="https://img.shields.io/crates/v/rrule.svg" /></a>
</p>
-
-# Usage
+# :zap: Quick start
```rust
extern crate rrule;
use rrule::build_rrule;
-let mut rrule_set = build_rule("RRULE:UNTIL=19990404T110000Z;DTSTART;TZID=America/New_York:19990104T110000Z;FREQ=WEEKLY;BYDAY=TU,WE");
+let mut rrule = build_rrule("DTSTART:20120201T093000Z\nRRULE:FREQ=DAILY;COUNT=3");
-// Get all occurrences of the rrule set
-let occurences = rrule_set.all();
+// Get all occurrences of the rrule
+let occurences = rrule.all();
+assert_eq!(occurences.len(), 3);
```
# Documentation and more examples