aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2012-11-17 16:01:59 -0600
committerJay Belanger2012-11-17 16:01:59 -0600
commit310e60d9454fe2d7e6920cf51f20d438e57f7b28 (patch)
tree53031f808541b9cdb2d17cc79a6b4168db5d0afc /lisp
parentd7fe635216f7ac026ede427198dbb75b238d3142 (diff)
downloademacs-310e60d9454fe2d7e6920cf51f20d438e57f7b28.tar.gz
emacs-310e60d9454fe2d7e6920cf51f20d438e57f7b28.zip
Calc now uses the Gregorian calendar for all dates,
and uses January 1, 1 AD as its day number 1. * doc/misc/calc.texi (Date Forms): Document this. * lisp/calc/calc-forms.el (math-julian-date-beginning) (math-julian-date-beginning-int): Implement this.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc-forms.el12
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f9e9217fe10..4c3f4e51ffb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-11-17 Paul Eggert <eggert@cs.ucla.edu>
2
3 * calc/calc-forms.el (math-julian-date-beginning)
4 (math-julian-date-beginning-int): Implement [new date numbering].
5
12012-11-17 Juanma Barranquero <lekktu@gmail.com> 62012-11-17 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * descr-text.el (quail-find-key): 8 * descr-text.el (quail-find-key):
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index c1f6d03db80..d1df20c697c 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -656,13 +656,13 @@ in the Gregorian calendar."
656 (setcdr math-fd-dt nil)) 656 (setcdr math-fd-dt nil))
657 fmt)))) 657 fmt))))
658 658
659(defconst math-julian-date-beginning '(float 17214235 -1) 659(defconst math-julian-date-beginning '(float 17214225 -1)
660 "The beginning of the Julian calendar, 660 "The beginning of the Julian date calendar,
661as measured in the number of days before January 1 of the year 1AD.") 661as measured in the number of days before December 31, 1 BC (Gregorian).")
662 662
663(defconst math-julian-date-beginning-int 1721424 663(defconst math-julian-date-beginning-int 1721423
664 "The beginning of the Julian calendar, 664 "The beginning of the Julian date calendar,
665as measured in the integer number of days before January 1 of the year 1AD.") 665as measured in the integer number of days before December 31, 1 BC (Gregorian).")
666 666
667(defun math-format-date-part (x) 667(defun math-format-date-part (x)
668 (cond ((stringp x) 668 (cond ((stringp x)