Files | Admin

Notes:

Release Name: 1.2.0

Notes:
The 1.2.0 release of ThirdBase makes it much easier to add custom
parsers.  Custom parsers can now be specified via a strptime
format string:

  DateTime.add_parser(:us, '%Z %m~%Y~%d %S`%M`%H')
  DateTime.parse('PDT 02~2009~28 15`45`12')
  => #<DateTime 2009-02-28T12:45:15-07:00>

With a strptime-based parser, you don't need to provide a block,
as the parser block is created for you.

You can still use the old Regexp-style parsers, and now they can
return a Date/DateTime instance directly, they are no longer
required to return a hash that is given to new!.

An additional default parser was added so the following can be
handled correctly:

 DateTime.parse(Time.now.to_s)
 DateTime.parse(Time.now.strftime('%+'))

The named timezones supported by Ruby's Time class are now
supported by ThirdBase (e.g. PST, EDT, UTC).

The %z strptime/strftime format string modifier now operates more
closely to standard ruby.


Changes: - Add strptime based parsers - Support named timezones supported by Time - Custom parser blocks can now return Date/DateTime instances - Fix %z format string modifier - Assume current seconds instead of 0 if only a timezone is parsed. - Bump version to 1.2.0