Mercurial > emacs
annotate lisp/calendar/cal-julian.el @ 111986:faa4a1c986c6
Merge changes made in Gnus trunk.
nnimap.el (nnimap-wait-for-response): Always look (at least) at the previous line.
nnimap.el (nnimap-quirk): New function.
(nnimap-retrieve-group-data-early): Use it.
(nnimap-quirks): New alist.
gnus.texi (Foreign Groups): Added clarification of foreign groups.
gnus-sum.el (gnus-summary-push-marks-to-backend): Fix the logic for copying read-ness to the backends.
gnus-group.el (gnus-group-kill-group): Notify the backend that the group has been killed.
(gnus-group-yank-group): Ditto.
gnus-start.el (gnus-subscribe-newsgroup): Notify the backend.
nnir.el: Improve customizations.
gnus.texi (Archived Messages): Removed outdated comment and text.
nnfolder.el (nnfolder-save-all-buffers): Refactor out into its own function.
(nnfolder-request-expire-articles): Save all the buffers after doing expiry.
nnmail.el (nnmail-expiry-target-group): Revert the "all articles are the last article", since that led to serious performance regressions when expiring nnml groups.
gnus-html.el (gnus-html-schedule-image-fetching): Make sure the HTML fetching stops when Gnus exits.
gnus-srvr.el: Avoid passing nil regexp argument to delete-matching-lines.
auth-source.el (auth-source-gpg-encrypt-to): New variable to set the list of recipient keys, or use symmetric encryption if not a list.
(auth-source-create): Use it to make `epa-file-encrypt-to' local for an EPA override, replacing the call to `netrc-store-data'.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 16 Dec 2010 22:22:28 +0000 |
parents | 280c8ae2476d |
children | 417b1e4d63cd |
rev | line source |
---|---|
38422
7a94f1c588c4
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
24189
diff
changeset
|
1 ;;; cal-julian.el --- calendar functions for the Julian calendar |
13053 | 2 |
92608
18dc9ef91100
(calendar-absolute-from-julian): Use zerop.
Glenn Morris <rgm@gnu.org>
parents:
92587
diff
changeset
|
3 ;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
106815 | 4 ;; 2008, 2009, 2010 Free Software Foundation, Inc. |
13053 | 5 |
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | |
67465
a55ee709ec8d
Update copyright pending Emacs 22.
Glenn Morris <rgm@gnu.org>
parents:
65145
diff
changeset
|
7 ;; Maintainer: Glenn Morris <rgm@gnu.org> |
13053 | 8 ;; Keywords: calendar |
9 ;; Human-Keywords: Julian calendar, Julian day number, calendar, diary | |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
10 ;; Package: calendar |
13053 | 11 |
12 ;; This file is part of GNU Emacs. | |
13 | |
94653
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
14 ;; GNU Emacs is free software: you can redistribute it and/or modify |
13053 | 15 ;; it under the terms of the GNU General Public License as published by |
94653
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
16 ;; the Free Software Foundation, either version 3 of the License, or |
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
17 ;; (at your option) any later version. |
13053 | 18 |
19 ;; GNU Emacs is distributed in the hope that it will be useful, | |
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 ;; GNU General Public License for more details. | |
23 | |
24 ;; You should have received a copy of the GNU General Public License | |
94653
e49abd957e81
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93844
diff
changeset
|
25 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
13053 | 26 |
27 ;;; Commentary: | |
28 | |
93482
103d07c67833
(Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents:
93447
diff
changeset
|
29 ;; See calendar.el. |
20462
d179de7ad92e
Add reference to new Calendrical Calculations book.
Paul Eggert <eggert@twinsun.com>
parents:
17380
diff
changeset
|
30 |
13053 | 31 ;;; Code: |
32 | |
33 (require 'calendar) | |
34 | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
35 (defun calendar-julian-to-absolute (date) |
92912 | 36 "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. |
37 The Gregorian date Sunday, December 31, 1 BC is imaginary." | |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93783
diff
changeset
|
38 (let ((month (calendar-extract-month date)) |
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93783
diff
changeset
|
39 (year (calendar-extract-year date))) |
92912 | 40 (+ (calendar-day-number date) |
41 (if (and (zerop (% year 100)) | |
42 (not (zerop (% year 400))) | |
43 (> month 2)) | |
44 1 0) ; correct for Julian but not Gregorian leap year | |
45 (* 365 (1- year)) | |
46 (/ (1- year) 4) | |
47 -2))) | |
48 | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
49 (define-obsolete-function-alias 'calendar-absolute-from-julian |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
50 'calendar-julian-to-absolute "23.1") |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
51 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
52 ;;;###cal-autoload |
13053 | 53 (defun calendar-julian-from-absolute (date) |
54 "Compute the Julian (month day year) corresponding to the absolute DATE. | |
55 The absolute date is the number of days elapsed since the (imaginary) | |
56 Gregorian date Sunday, December 31, 1 BC." | |
92819 | 57 (let* ((approx (/ (+ date 2) 366)) ; approximation from below |
58 (year ; search forward from the approximation | |
13053 | 59 (+ approx |
60 (calendar-sum y approx | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
61 (>= date (calendar-julian-to-absolute |
92912 | 62 (list 1 1 (1+ y)))) |
63 1))) | |
92819 | 64 (month ; search forward from January |
13053 | 65 (1+ (calendar-sum m 1 |
92912 | 66 (> date |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
67 (calendar-julian-to-absolute |
92912 | 68 (list m |
69 (if (and (= m 2) (zerop (% year 4))) | |
70 29 | |
71 (aref [31 28 31 30 31 30 31 | |
72 31 30 31 30 31] | |
73 (1- m))) | |
74 year))) | |
75 1))) | |
92819 | 76 (day ; calculate the day by subtraction |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
77 (- date (1- (calendar-julian-to-absolute (list month 1 year)))))) |
13053 | 78 (list month day year))) |
79 | |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
80 ;;;###cal-autoload |
13053 | 81 (defun calendar-julian-date-string (&optional date) |
82 "String of Julian date of Gregorian DATE. | |
83 Defaults to today's date if DATE is not given. | |
84 Driven by the variable `calendar-date-display-form'." | |
85 (calendar-date-string | |
86 (calendar-julian-from-absolute | |
92912 | 87 (calendar-absolute-from-gregorian (or date (calendar-current-date)))) |
13053 | 88 nil t)) |
89 | |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
90 ;;;###cal-autoload |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
91 (defun calendar-julian-print-date () |
13053 | 92 "Show the Julian calendar equivalent of the date under the cursor." |
93 (interactive) | |
94 (message "Julian date: %s" | |
95 (calendar-julian-date-string (calendar-cursor-to-date t)))) | |
96 | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
97 (define-obsolete-function-alias 'calendar-print-julian-date |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
98 'calendar-julian-print-date "23.1") |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
99 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
100 ;;;###cal-autoload |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
101 (defun calendar-julian-goto-date (date &optional noecho) |
92912 | 102 "Move cursor to Julian DATE; echo Julian date unless NOECHO is non-nil." |
13053 | 103 (interactive |
104 (let* ((today (calendar-current-date)) | |
105 (year (calendar-read | |
106 "Julian calendar year (>0): " | |
92587
267241a78df9
Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents:
79703
diff
changeset
|
107 (lambda (x) (> x 0)) |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
108 (number-to-string |
93809
3ff2b47de8f2
Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents:
93783
diff
changeset
|
109 (calendar-extract-year |
13053 | 110 (calendar-julian-from-absolute |
111 (calendar-absolute-from-gregorian | |
112 today)))))) | |
113 (month-array calendar-month-name-array) | |
114 (completion-ignore-case t) | |
54076
9e3e3d184730
(calendar-goto-julian-date): Use assoc-string instead of
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
115 (month (cdr (assoc-string |
92912 | 116 (completing-read |
117 "Julian calendar month name: " | |
118 (mapcar 'list (append month-array nil)) | |
119 nil t) | |
54076
9e3e3d184730
(calendar-goto-julian-date): Use assoc-string instead of
Glenn Morris <rgm@gnu.org>
parents:
52401
diff
changeset
|
120 (calendar-make-alist month-array 1) t))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
38422
diff
changeset
|
121 (last |
13053 | 122 (if (and (zerop (% year 4)) (= month 2)) |
123 29 | |
124 (aref [31 28 31 30 31 30 31 31 30 31 30 31] (1- month)))) | |
125 (day (calendar-read | |
126 (format "Julian calendar day (%d-%d): " | |
127 (if (and (= year 1) (= month 1)) 3 1) last) | |
92587
267241a78df9
Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents:
79703
diff
changeset
|
128 (lambda (x) |
92912 | 129 (and (< (if (and (= year 1) (= month 1)) 2 0) x) |
130 (<= x last)))))) | |
13053 | 131 (list (list month day year)))) |
132 (calendar-goto-date (calendar-gregorian-from-absolute | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
133 (calendar-julian-to-absolute date))) |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
134 (or noecho (calendar-julian-print-date))) |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
135 |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
136 (define-obsolete-function-alias 'calendar-goto-julian-date |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
137 'calendar-julian-goto-date "23.1") |
13053 | 138 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
139 ;;;###holiday-autoload |
13053 | 140 (defun holiday-julian (month day string) |
92819 | 141 "Holiday on MONTH, DAY (Julian) called STRING. |
13053 | 142 If MONTH, DAY (Julian) is visible, the value returned is corresponding |
143 Gregorian date in the form of the list (((month day year) STRING)). Returns | |
144 nil if it is not visible in the current calendar window." | |
93496
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
145 (let ((gdate (calendar-nongregorian-visible-p |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
146 month day 'calendar-julian-to-absolute |
93496
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
147 'calendar-julian-from-absolute |
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
148 ;; In the Gregorian case, we'd use the lower year when |
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
149 ;; month >= 11. In the Julian case, there is an offset |
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
150 ;; of two weeks (ie 1 Nov Greg = 19 Oct Julian). So we |
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
151 ;; use month >= 10, since it can't cause any problems. |
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
152 (lambda (m) (< m 10))))) |
cdfc8242a666
(holiday-julian): Use calendar-nongregorian-visible-p.
Glenn Morris <rgm@gnu.org>
parents:
93482
diff
changeset
|
153 (if gdate (list (list gdate string))))) |
13053 | 154 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
155 ;;;###cal-autoload |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
156 (defun calendar-astro-to-absolute (d) |
13673
da11ffac4f8b
(calendar-absolute-from-astro): Doc fix.
Paul Eggert <eggert@twinsun.com>
parents:
13053
diff
changeset
|
157 "Absolute date of astronomical (Julian) day number D." |
13053 | 158 (- d 1721424.5)) |
159 | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
160 (define-obsolete-function-alias 'calendar-absolute-from-astro |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
161 'calendar-astro-to-absolute "23.1") |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
162 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
163 ;;;###cal-autoload |
13053 | 164 (defun calendar-astro-from-absolute (d) |
165 "Astronomical (Julian) day number of absolute date D." | |
166 (+ d 1721424.5)) | |
167 | |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
168 ;;;###cal-autoload |
13053 | 169 (defun calendar-astro-date-string (&optional date) |
170 "String of astronomical (Julian) day number after noon UTC of Gregorian DATE. | |
171 Defaults to today's date if DATE is not given." | |
93844
bf9ef749c23e
Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents:
93809
diff
changeset
|
172 (number-to-string |
13053 | 173 (ceiling |
174 (calendar-astro-from-absolute | |
92912 | 175 (calendar-absolute-from-gregorian (or date (calendar-current-date))))))) |
13053 | 176 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
177 ;;;###cal-autoload |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
178 (defun calendar-astro-print-day-number () |
92819 | 179 "Show astronomical (Julian) day number after noon UTC on cursor date." |
13053 | 180 (interactive) |
181 (message | |
15069
6237f2b08205
Spelling error.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
14169
diff
changeset
|
182 "Astronomical (Julian) day number (at noon UTC): %s.0" |
13053 | 183 (calendar-astro-date-string (calendar-cursor-to-date t)))) |
184 | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
185 (define-obsolete-function-alias 'calendar-print-astro-day-number |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
186 'calendar-astro-print-day-number "23.1") |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
187 |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
188 ;;;###cal-autoload |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
189 (defun calendar-astro-goto-day-number (daynumber &optional noecho) |
13053 | 190 "Move cursor to astronomical (Julian) DAYNUMBER. |
92912 | 191 Echo astronomical (Julian) day number unless NOECHO is non-nil." |
13053 | 192 (interactive (list (calendar-read |
193 "Astronomical (Julian) day number (>1721425): " | |
92587
267241a78df9
Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents:
79703
diff
changeset
|
194 (lambda (x) (> x 1721425))))) |
13053 | 195 (calendar-goto-date |
196 (calendar-gregorian-from-absolute | |
197 (floor | |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
198 (calendar-astro-to-absolute daynumber)))) |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
199 (or noecho (calendar-astro-print-day-number))) |
13053 | 200 |
93636
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
201 (define-obsolete-function-alias 'calendar-goto-astro-day-number |
f5d39ae0db5b
(calendar-julian-to-absolute): Rename calendar-absolute-from-julian.
Glenn Morris <rgm@gnu.org>
parents:
93496
diff
changeset
|
202 'calendar-astro-goto-day-number "23.1") |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
203 |
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
204 (defvar date) |
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
205 |
93783 | 206 ;; To be called from diary-list-sexp-entries, where DATE is bound. |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
207 ;;;###diary-autoload |
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
208 (defun diary-julian-date () |
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
209 "Julian calendar equivalent of date diary entry." |
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
210 (format "Julian date: %s" (calendar-julian-date-string date))) |
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
211 |
93783 | 212 ;; To be called from diary-list-sexp-entries, where DATE is bound. |
92834
3e0b7b9e8f11
(diary-julian-date): Move to end.
Glenn Morris <rgm@gnu.org>
parents:
92819
diff
changeset
|
213 ;;;###diary-autoload |
13053 | 214 (defun diary-astro-day-number () |
215 "Astronomical (Julian) day number diary entry." | |
17380
ba0844956fde
(diary-astro-day-number): Change format string.
Richard M. Stallman <rms@gnu.org>
parents:
15069
diff
changeset
|
216 (format "Astronomical (Julian) day number at noon UTC: %s.0" |
13053 | 217 (calendar-astro-date-string date))) |
218 | |
219 (provide 'cal-julian) | |
220 | |
92587
267241a78df9
Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents:
79703
diff
changeset
|
221 ;; arch-tag: 0520acdd-1c60-4188-9aa8-9b8c24d856ae |
13053 | 222 ;;; cal-julian.el ends here |