README.md in timespan-0.3.1 vs README.md in timespan-0.3.2
- old
+ new
@@ -28,9 +28,24 @@
t = Timespan.new(:from => 2.days.ago, :duration => "5 months and 2 weeks")
```
See specs for more examples of usage
+## Comparison
+
+```ruby
+timespan.between?(2.days.ago, 1.minute.from_now)
+timespan.between?(1.days, 3.days)
+timespan < 3.days
+```
+
+## Math
+
+```ruby
+3_days_more = timespan + 3.days
+day_less = timespan -1 3.day
+```
+
## Spanner
Internally Timespan uses Spanner to parse duration strings.
`Spanner.parse('23 hours 12 minutes')