- Fix RuboCop issues (thanks @utkarsh2102).
- Change minimum required ruby version to 2.4 (thanks @utkarsh2102).
- Remove git dependency (thanks @utkarsh2102).
- Fix
DateTime#to_s
(thanks @nbeyer).
- Reduce the number of files that ship in the artifact (thanks @tas50).
- Fix
Months#to_seconds
from November (thanks @walterbrebels).
- Add support for unary minus operator (thanks @walterbrebels).
- Fix
TimeInterval
size for non UTC timezones. (#41)
- Fix
TimeInterval
with<duration>/<end>
patterns and leap years. - Fix decimal fractions on date atoms. WARNING some duration patterns are no longer valid.
- Fix
Duration#to_pattern
for negative durations based on aNumeric
(thanks @figwit).
This version is not compatible with previous versions. Atoms and Durations
changed their interface when treating base dates so it is only applied when
computing the Atom length (e.g. #to_seconds
). As a consequence, it is no
longer possible to do operations like DateTime + Duration
.
- Add time intervals (thanks @Angelmmiguel).
- Remove
Duration#to_i
. - Change
Duration#to_seconds
to accept a baseDateTime
. - Remove duration dependency on a base date on the instance level.
- Change
Years#to_seconds
andMonths#to_seconds
to accept a baseDateTime
. - Remove atom dependency on a base date on the instance level.
- Add
Atomic
mixin. - Remove
Atom
abstract class. - Allow
ISO8601::Duration
to perform operations withNumeric
(thanks @Angelmmiguel).
- Make
Atom
comparable with the same kind (thanks @glassbead0). - Fix #18 document interfaces to core date/time classes.
- Fix #26 operations with Date, DateTime and Time with Duration (e.g.
ISO8601::DateTime.new('2012-07-07T20:20:20Z') - ISO8601::Duration.new('PT10M')
). - Fix #25 accept time components with timezone and only hour component (e.g.
ISO8601::Time.new('T10+01:00')
). - Fix Docker image for testing and inspecting.
- Fix
DateTime#hash
- Fix
DateTime#second
andTime#second
precision. Now it's rounded to the first decimal.
- Remove unwanted log.
- Fix partial time patterns with timezone:
PThh:mmZ
,PThhZ
.
- Fix time components using comma (,) as a decimal separator.
- Fix durations using comma (,) as a decimal separator.
DateTime
has hash identity by value.Time
has hash identity by value.Date
has hash identity by value.Duration
has hash identity by value.Atom
has hash identity by value.Atom#value
returns either an integer or a float.Atom#to_s
returns a valid ISO8601 subpattern.
- Add decimal fractions for any component in a duration.
- Add a catch all
ISO8601::Errors::StandardError
. - Add support for comma (
,
) as a separator for duration decimal fractions.
- Add
#hash
toDuration
,Date
,Time
andDateTime
.
- Fix
DateTime
when handling empty strings.
- Fix durations with sign.
- Drop support for Ruby 1.8.7.
- Add support for Rubinius 2.
ISO8601::DateTime#century
no longer exists. Truncated representations were removed in ISO 8601:2004.ISO8601::DateTime#zone
delegates to coreDateTime#zone
.ISO8601::DateTime#timezone
no longer exists. Now it delegates toDateTime#zone
.- A date can have sign:
-1000-01-01
,+2014-05-06T10:11:12Z
. - A date time can be converted to an array of atoms with
#to_a
. - Ordinal dates supported.
- A date component is represented by
ISO8601::Date
. - Week date pattern (YYYY-Wdww, YYYY-Www-D).