In AIX, altzone exists in the standard library but is not declared
in time.h. By 524513be39, have_var
and try_var in mkmf recognizes a variable that exists in a library
even when it is not declared. As a result, in AIX, HAVE_ALTZONE
is defined, but compile fails due to the lack of the declaration.
%v is supposed to be the VMS date, and VMS date format uses an
uppercase month.
Ruby 1.8 used an uppercase month for %v, but the behavior was
changed without explanation in r31672.
Time#strftime still uses an uppercase month for %v, so this change
makes Date#strftime consistent with Time#strftime.
Fixes [Bug #13810]
https://github.com/ruby/date/commit/56c489fd7e
This problem exists because Marshal.load calls Date.allocate, which
uses a SimpleDateData. There doesn't seem to be any support for
taking an existing Date instance and converting it from SimpleDateData
to ComplexDateData. Work around this issue by making Date.allocate
use a ComplexDateData. This causes problems in Date#initialize,
so remove the Date#initialize method (keeping the date_initialize
function, used internally for Date.civil). Alias Date.new to
Date.civil, since they do the same thing.
https://github.com/ruby/date/commit/6bb8d8fa0f
This gets the time zone abbreviations from
https://www.timeanddate.com/time/zones/, and adds unambiguous time
zones not already present in zonetab.list. See bin/update-abbr
for the program used.
This regenerates zonetab.h using prereq.mk (requires gperf).
Only one test line is added, just to make sure a new time zone
abbreviation is picked up.
Fixes Ruby Bug 16286
https://github.com/ruby/date/commit/702e8b3033
Previously, the type of these arguments were not checked, leading to
NoMethodErrors in some cases, and TypeErrors in other cases, but not
showing what field was having the problems. This change makes it so
the field with the problem is included in the error message.
For the valid_*? methods, this changes them to return false if one
of the arguments that should be numeric is not.
Fixes Ruby Bug 11935
Fixes Ruby Misc 15298
https://github.com/ruby/date/commit/a2f4b665f8
Previously, julian dates would not round trip through to_time.to_date,
because Time is always considered gregorian. This converts the Date
instance from julian to gregorian before converting to Time, ensuring
that an equal date object will be returned if converting that Time
back to Date.
This does result in julian Date objects showing different day values
if converting to Time.
Fixes Ruby Bug 8428.
https://github.com/ruby/date/commit/d8df64555e