Revert "scalinger -> scaliger"

This reverts commit de0fbf2648.
This commit is contained in:
Sam Tobin-Hochstadt 2019-10-22 11:12:17 -04:00
parent 8f579af413
commit 2f8207e7c9
3 changed files with 7 additions and 22 deletions

View File

@ -226,16 +226,16 @@ local time by default or UTC if @racket[local-time?] is
error is signaled, otherwise an integer is returned.}
@defproc[(date->julian/scaliger [date date?]) exact-integer?]{
@defproc[(date->julian/scalinger [date date?]) exact-integer?]{
Converts a date structure (up to 2099 BCE Gregorian) into a Julian
date number. The returned value is not a strict Julian number, but
rather Scaliger's version, which is off by one for easier
rather Scalinger's version, which is off by one for easier
calculations.}
@defproc[(julian/scaliger->string [date-number exact-integer?])
@defproc[(julian/scalinger->string [date-number exact-integer?])
string?]{
Converts a Julian number (Scaliger's off-by-one version) into a
Converts a Julian number (Scalinger's off-by-one version) into a
string.}

View File

@ -72,13 +72,9 @@
(test-string 'rfc2822 #t "Thu, 4 May 2006 03:02:01 -0600")
(test-string 'julian #f "JD 2 453 860")
(test-string 'julian #t "JD 2 453 860, 03:02:01")
;; In the off chance that one of these changes and not the other,
;; both are provided for tests.
(test 2453860 date->julian/scalinger d)
(test 2453860 date->julian/scaliger d)
(test "JD 2 453 860" julian/scalinger->string 2453860)
(test "JD 2 453 860" julian/scaliger->string 2453860))
(test "JD 2 453 860" julian/scalinger->string 2453860))
;; Bad dates
(err/rt-test (find-seconds 0 0 0 0 0 1990) exn:fail?)
@ -110,14 +106,9 @@
;; one of the two possible values, though:
(test-find 0 30 1 7 11 2010))))
;; In the off chance that one of these changes and not the other,
;; both are provided for tests.
;; bug fixes
(test "JD 12" julian/scalinger->string 12)
(test "JD 12" julian/scaliger->string 12)
(test "JD 123" julian/scalinger->string 123)
(test "JD 123" julian/scaliger->string 123)
;; make sure that date* has the correct parent info
(test #t date*?

View File

@ -18,9 +18,7 @@
. ->* .
exact-integer?)]
[date->julian/scalinger (date? . -> . exact-integer?)]
[date->julian/scaliger (date? . -> . exact-integer?)]
[julian/scalinger->string (exact-integer? . -> . string?)]
[julian/scaliger->string (exact-integer? . -> . string?)])
[julian/scalinger->string (exact-integer? . -> . string?)])
(define (current-date)
(seconds->date (* #i1/1000 (current-inexact-milliseconds))))
@ -350,8 +348,6 @@
gregorian-adjustment))
final-date)
(define date->julian/scaliger date->julian/scalinger)
;; julian/scalinger->string :
;; number [julian-day] -> string [julian-day-format]
@ -376,5 +372,3 @@
(cadr reversed-digits)
(car reversed-digits)))
(loop (cdr (cdr (cdr reversed-digits))))))))))))
(define julian/scaliger->string julian/scalinger->string)