diff options
author | Jim Blandy <[email protected]> | 1993-06-22 03:24:44 +0000 |
---|---|---|
committer | Jim Blandy <[email protected]> | 1993-06-22 03:24:44 +0000 |
commit | 80e48f9fa82af050b969994eb86cd314b656cc33 (patch) | |
tree | b4524a1a679d600231dc51fbcf02352256704de6 /lisp/calendar/lunar.el | |
parent | 8ec105a066d2d0b8d7ac02bdecbe95b43dcf53d4 (diff) |
* lunar.el (lunar-phase): Use time conversion from solar.el
Diffstat (limited to 'lisp/calendar/lunar.el')
-rw-r--r-- | lisp/calendar/lunar.el | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index d6ef380e44..7929efeb3d 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -160,41 +160,13 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, ((= phase 2) (- adjustment adj)) (t adjustment))) (date (+ date adjustment)) - (calendar-standard-time-zone-name - (if calendar-time-zone calendar-standard-time-zone-name "UT")) - (calendar-daylight-savings-starts - (if calendar-time-zone calendar-daylight-savings-starts)) - (calendar-daylight-savings-ends - (if calendar-time-zone calendar-daylight-savings-ends)) - (calendar-time-zone (if calendar-time-zone calendar-time-zone 0)) - (year (extract-calendar-year - (calendar-gregorian-from-absolute (truncate date)))) - (dst (and calendar-daylight-savings-starts - calendar-daylight-savings-ends - (<= (calendar-absolute-from-gregorian - (eval calendar-daylight-savings-starts)) - date) - (< date - (calendar-absolute-from-gregorian - (eval calendar-daylight-savings-ends))))) - (date (+ date - (/ (+ (if dst 60 0) calendar-time-zone) 60.0 24.0) - (- (/ (solar-ephemeris-correction year) 60.0 24.0)))) + (date (+ date (- (/ (solar-ephemeris-correction + (extract-calendar-year + (calendar-gregorian-from-absolute + (truncate date)))) 60.0 24.0)))) (time (* 24 (- date (truncate date)))) - (date (calendar-gregorian-from-absolute (truncate date))) - (time-zone calendar-time-zone) - (time-zone (if dst - calendar-daylight-time-zone-name - calendar-standard-time-zone-name)) - (24-hours (truncate time)) - (12-hours (format "%d" (if (> 24-hours 12) - (- 24-hours 12) - (if (= 24-hours 0) 12 24-hours)))) - (am-pm (if (>= 24-hours 12) "pm" "am")) - (minutes (format "%02d" (round (* 60 (- time 24-hours))))) - (24-hours (format "%02d" 24-hours)) - (time (mapconcat 'eval calendar-time-display-form ""))) - (list date time phase))) + (date (calendar-gregorian-from-absolute (truncate date)))) + (list date (solar-time-string time date) phase))) (defun lunar-phase-name (phase) "Name of lunar PHASE. |