diff options
| author | Jay Belanger | 2012-11-17 15:34:09 -0600 |
|---|---|---|
| committer | Jay Belanger | 2012-11-17 15:34:09 -0600 |
| commit | 3dc7dad23add129340e7179e12bc12cc82d07001 (patch) | |
| tree | c57a69b4920b05d60300e9c96db821abcbbe534a /lisp | |
| parent | c9f618db44110a48efdfe166ddc43ce0cb787852 (diff) | |
| download | emacs-3dc7dad23add129340e7179e12bc12cc82d07001.tar.gz emacs-3dc7dad23add129340e7179e12bc12cc82d07001.zip | |
* calc/calc-forms.el (calc-gregorian-switch): Declare.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calc/calc-forms.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 4573377745c..c1f6d03db80 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el | |||
| @@ -520,7 +520,7 @@ use the Gregorian calendar." | |||
| 520 | "Return the number of days of the year up to YEAR MONTH DAY. | 520 | "Return the number of days of the year up to YEAR MONTH DAY. |
| 521 | The count includes the given date." | 521 | The count includes the given date." |
| 522 | (if calc-gregorian-switch | 522 | (if calc-gregorian-switch |
| 523 | (cond ((math-equalp year (nth 0 calc-gregorian-switch)) | 523 | (cond ((eq year (nth 0 calc-gregorian-switch)) |
| 524 | (1+ | 524 | (1+ |
| 525 | (- (math-absolute-from-dt year month day) | 525 | (- (math-absolute-from-dt year month day) |
| 526 | (math-absolute-from-dt year 1 1)))) | 526 | (math-absolute-from-dt year 1 1)))) |
| @@ -587,6 +587,10 @@ in the Gregorian calendar." | |||
| 587 | ;; Adjustment, since January 1, 1 (Julian) is absolute day -1 | 587 | ;; Adjustment, since January 1, 1 (Julian) is absolute day -1 |
| 588 | 2))) | 588 | 2))) |
| 589 | 589 | ||
| 590 | ;; calc-gregorian-switch is a customizable variable defined in calc.el | ||
| 591 | (defvar calc-gregorian-switch) | ||
| 592 | |||
| 593 | |||
| 590 | (defun math-absolute-from-dt (year month day) | 594 | (defun math-absolute-from-dt (year month day) |
| 591 | "Return the DATE of the day given by the day YEAR MONTH DAY. | 595 | "Return the DATE of the day given by the day YEAR MONTH DAY. |
| 592 | Recall that DATE is the number of days since December 31, -1 | 596 | Recall that DATE is the number of days since December 31, -1 |