[前][次][番号順一覧][スレッド一覧]

ruby-changes:72855

From: Nobuyoshi <ko1@a...>
Date: Mon, 8 Aug 2022 21:14:21 +0900 (JST)
Subject: [ruby-changes:72855] 289d219758 (master): [ruby/date] [DOC] Fix about calendars difference

https://git.ruby-lang.org/ruby.git/commit/?id=289d219758

From 289d219758336e1e1d8afe36255fe06079d8daeb Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 8 Aug 2022 21:13:52 +0900
Subject: [ruby/date] [DOC] Fix about calendars difference

https://github.com/ruby/date/commit/0ae93e26aa
---
 doc/date/calendars.rdoc | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/doc/date/calendars.rdoc b/doc/date/calendars.rdoc
index e2118d3e9d..b8690841b1 100644
--- a/doc/date/calendars.rdoc
+++ b/doc/date/calendars.rdoc
@@ -4,19 +4,16 @@ The difference between the https://github.com/ruby/ruby/blob/trunk/doc/date/calendars.rdoc#L4
 {Julian calendar}[https://en.wikipedia.org/wiki/Julian_calendar]
 and the
 {Gregorian calendar}[https://en.wikipedia.org/wiki/Gregorian_calendar]
-may matter to your program if it uses dates in the interval:
+may matter to your program if it uses dates before the switchovers.
 
 - October 15, 1582.
 - September 14, 1752.
 
-A date outside that interval (including all dates in modern times)
-is the same in both calendars.
-However, a date _within_ that interval will be different
-in the two calendars.
+A date will be different in the two calendars, in general.
 
-=== Different Calendar, Different \Date
+=== Different switchover dates
 
-The reason for the difference is this:
+The reasons for the difference are religious/political histories.
 
 - On October 15, 1582, several countries changed
   from the Julian calendar to the Gregorian calendar;
@@ -25,10 +22,12 @@ The reason for the difference is this: https://github.com/ruby/ruby/blob/trunk/doc/date/calendars.rdoc#L22
 - On September 14, 1752, most of the British empire
   changed from the Julian calendar to the Gregorian calendar.
 
-When your code uses a date in this "gap" interval,
+When your code uses a date before these switchover dates,
 it will matter whether it considers the switchover date
 to be the earlier date or the later date (or neither).
 
+See also {a concrete example here}[rdoc-ref:DateTime@When+should+you+use+DateTime+and+when+should+you+use+Time-3F].
+
 === Argument +start+
 
 Certain methods in class \Date handle differences in the
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]