diff options
| author | Paul Eggert | 2012-11-17 16:01:59 -0600 |
|---|---|---|
| committer | Jay Belanger | 2012-11-17 16:01:59 -0600 |
| commit | 310e60d9454fe2d7e6920cf51f20d438e57f7b28 (patch) | |
| tree | 53031f808541b9cdb2d17cc79a6b4168db5d0afc /lisp | |
| parent | d7fe635216f7ac026ede427198dbb75b238d3142 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calc/calc-forms.el | 12 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-11-17 Juanma Barranquero <lekktu@gmail.com> | 6 | 2012-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, |
| 661 | as measured in the number of days before January 1 of the year 1AD.") | 661 | as 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, |
| 665 | as measured in the integer number of days before January 1 of the year 1AD.") | 665 | as 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) |