]> code.delx.au - gnu-emacs/commitdiff
* calc/calc-forms.el (calc-gregorian-switch): Declare.
authorJay Belanger <jay.p.belanger@gmail.com>
Sat, 17 Nov 2012 21:34:09 +0000 (15:34 -0600)
committerJay Belanger <jay.p.belanger@gmail.com>
Sat, 17 Nov 2012 21:34:09 +0000 (15:34 -0600)
lisp/calc/calc-forms.el

index 4573377745c4f35165bb5cc4ef1ff0c2b3767508..c1f6d03db806e1cb07da34255ffa7b65c6420f92 100644 (file)
@@ -520,7 +520,7 @@ use the Gregorian calendar."
   "Return the number of days of the year up to YEAR MONTH DAY.
 The count includes the given date."
   (if calc-gregorian-switch
-      (cond ((math-equalp year (nth 0 calc-gregorian-switch))
+      (cond ((eq year (nth 0 calc-gregorian-switch))
              (1+
               (- (math-absolute-from-dt year month day)
                  (math-absolute-from-dt year 1 1))))
@@ -587,6 +587,10 @@ in the Gregorian calendar."
      ;; Adjustment, since January 1, 1 (Julian) is absolute day -1
      2)))
 
+;; calc-gregorian-switch is a customizable variable defined in calc.el
+(defvar calc-gregorian-switch)
+
+
 (defun math-absolute-from-dt (year month day)
   "Return the DATE of the day given by the day YEAR MONTH DAY.
 Recall that DATE is the number of days since December 31, -1