mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Correct note about Gregorian reform in SRFI-19
* doc/ref/srfi-modules.texi (SRFI-19): SRFI-19 specifies proleptic use of the Gregorian calendar, so it was incorrect of the documentation to describe the code as erroneous in doing so. Rewrite the caution more neutrally, and move it to the section about the "date" structure, where it seems most relevant.
This commit is contained in:
parent
886ac3e2ab
commit
fc84f4f13d
1 changed files with 10 additions and 11 deletions
|
@ -2383,17 +2383,6 @@ functions and variables described here are provided by
|
||||||
(use-modules (srfi srfi-19))
|
(use-modules (srfi srfi-19))
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@strong{Caution}: The current code in this module incorrectly extends
|
|
||||||
the Gregorian calendar leap year rule back prior to the introduction
|
|
||||||
of those reforms in 1582 (or the appropriate year in various
|
|
||||||
countries). The Julian calendar was used prior to 1582, and there
|
|
||||||
were 10 days skipped for the reform, but the code doesn't implement
|
|
||||||
that.
|
|
||||||
|
|
||||||
This will be fixed some time. Until then calculations for 1583
|
|
||||||
onwards are correct, but prior to that any day/month/year and day of
|
|
||||||
the week calculations are wrong.
|
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* SRFI-19 Introduction::
|
* SRFI-19 Introduction::
|
||||||
* SRFI-19 Time::
|
* SRFI-19 Time::
|
||||||
|
@ -2593,6 +2582,16 @@ The fields are year, month, day, hour, minute, second, nanoseconds and
|
||||||
timezone. A date object is immutable, its fields can be read but they
|
timezone. A date object is immutable, its fields can be read but they
|
||||||
cannot be modified once the object is created.
|
cannot be modified once the object is created.
|
||||||
|
|
||||||
|
Historically, the Gregorian calendar was only used from the latter part
|
||||||
|
of the year 1582 onwards, and not until even later in many countries.
|
||||||
|
Prior to that most countries used the Julian calendar. SRFI-19 does
|
||||||
|
not deal with the Julian calendar at all, and so does not reflect this
|
||||||
|
historical calendar reform. Instead it projects the Gregorian calendar
|
||||||
|
back proleptically as far as necessary. When dealing with historical
|
||||||
|
data, especially prior to the British Empire's adoption of the Gregorian
|
||||||
|
calendar in 1752, one should be mindful of which calendar is used in
|
||||||
|
each context, and apply non-SRFI-19 facilities to convert where necessary.
|
||||||
|
|
||||||
@defun date? obj
|
@defun date? obj
|
||||||
Return @code{#t} if @var{obj} is a date object, or @code{#f} if not.
|
Return @code{#t} if @var{obj} is a date object, or @code{#f} if not.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue