README.md in fugit-1.7.2 vs README.md in fugit-1.8.0

- old
+ new

@@ -87,9 +87,28 @@ ## do_parse_cron, do_parse_in, do_parse_at, do_parse_duration, and do_parse_nat As `Fugit.parse(s)` returns nil when it doesn't grok its input, and `Fugit.do_parse(s)` fails when it doesn't grok, each of the `parse_` methods has its partner `do_parse_` method. +## parse_cronish and do_parse_cronish + +Sometimes you know a cron expression or an "every" natural expression will come in and you want to discard the rest. + +``` +require 'fugit' + +Fugit.parse_cronish('0 0 1 jan *').class # ==> ::Fugit::Cron +Fugit.parse_cronish('every saturday at noon').class # ==> ::Fugit::Cron + +Fugit.parse_cronish('12y12M') # ==> nil +``` + +`.parse_cronish(s)` will return a `Fugit::Cron` instance or else nil. + +`.do_parse_cronish(s)` will return a `Fugit::Cron` instance or else fail with an `ArgumentError`. + +Introduced in fugit 1.8.0. + ## `Fugit::Cron` A class `Fugit::Cron` to parse cron strings and then `#next_time` and `#previous_time` to compute the next or the previous occurrence respectively. There is also a `#brute_frequency` method which returns an array `[ shortest delta, longest delta, occurrence count ]` where delta is the time between two occurrences.