README.rdoc in timeliness-0.1.0 vs README.rdoc in timeliness-0.1.1

- old
+ new

@@ -9,15 +9,15 @@ * Extensible with custom formats and tokens. * It's pretty fast. Up to 60% faster than Time/Date parse method. * Control the parser strictness. * Control behaviour of ambiguous date formats (US vs European e.g. mm/dd/yy, dd/mm/yy). -* I18n support (for months). +* I18n support (for months), if I18n gem loaded. * Fewer WTFs than Time/Date parse method. * Has no dependencies. -Extracted from the validates_timeliness gem, it has been rewritten cleaner and much faster. It's most suitable for when +Extracted from my {validates_timeliness gem}[http://github.com/adzap/validates_timeliness], it has been rewritten cleaner and much faster. It's most suitable for when you need to control the parsing behaviour. It's faster than the Time/Date class parse methods, so it has general appeal. == Usage @@ -34,11 +34,11 @@ or specified with :now option: Timeliness.parse('12:13:14', :now => Time.mktime(2010,9,8)) #=> Wed Sep 08 12:13:14 1000 2010 -You can also provide a type which will tell the parser that you are only interested in the values for that type. +You can also provide a type which will tell the parser that you are only interested in the part of the value for that type. Timeliness.parse('2010-09-08 12:13:14', :date) #=> Wed Sep 08 00:00:00 1000 2010 Timeliness.parse('2010-09-08 12:13:14', :time) #=> Sat Jan 01 12:13:14 1100 2000 Timeliness.parse('2010-09-08 12:13:14', :datetime) #=> Wed Sep 08 12:13:14 1000 2010 i.e. the whole string is used @@ -46,11 +46,11 @@ Timeliness.parse('2010-09-08 12:13:14', :date, :strict => true) #=> nil Timeliness.parse('2010-09-08 12:13:14', :time, :strict => true) #=> nil Timeliness.parse('2010-09-08 12:13:14', :datetime, :strict => true) #=> Wed Sep 08 12:13:14 1000 2010 i.e. the whole string is used -The strict option without a type is ignored. +The date and time strings are not accepted for a datetime type. The strict option without a type is ignored. To control what zone the time object is returned in, you have two options. Firstly you can set the default zone. Below is the list of options with their effective time creation method call Timeliness.default_timezone = :local # Time.local(...) @@ -164,10 +164,10 @@ ddd = Day name of 3 to 9 letters (e.g. Wed or Wednesday) u = microseconds matches 1 to 3 digits All other characters are considered literal. For the technically minded, these formats are compiled into a single regular expression -To see all defined formats look at the {parser source code}[http://github.com/adzap/timeliness/tree/master/lib/timeliness/parser.rb]. +To see all defined formats look at the {source code}[http://github.com/adzap/timeliness/tree/master/lib/timeliness/formats.rb]. == Settings === US/Euro Formats