diff options
| author | Jay Belanger | 2007-06-22 05:52:29 +0000 |
|---|---|---|
| committer | Jay Belanger | 2007-06-22 05:52:29 +0000 |
| commit | e5f1224e183f937a66455d45d0a6c467a80d6e2b (patch) | |
| tree | 7812e79d703684729133b49b5fb83066e22da606 /lisp | |
| parent | 4903b28a1208cc6ad9e00d250d8e670908902f27 (diff) | |
| download | emacs-e5f1224e183f937a66455d45d0a6c467a80d6e2b.tar.gz emacs-e5f1224e183f937a66455d45d0a6c467a80d6e2b.zip | |
(math-format-date-part,math-parse-standard-date,calcFunc-julian):
Replace math-read-number-simple by math-read-number.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calc/calc-forms.el | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 7d4065c40ee..a0e6763a203 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el | |||
| @@ -560,11 +560,13 @@ | |||
| 560 | ((eq x 'J) | 560 | ((eq x 'J) |
| 561 | (math-format-number | 561 | (math-format-number |
| 562 | (math-add math-fd-date | 562 | (math-add math-fd-date |
| 563 | (math-read-number-simple "1.7214235")))) | 563 | (eval-when-compile |
| 564 | (math-read-number "1.7214235"))))) | ||
| 564 | ((eq x 'j) | 565 | ((eq x 'j) |
| 565 | (math-format-number (math-add | 566 | (math-format-number (math-add |
| 566 | (math-floor math-fd-date) | 567 | (math-floor math-fd-date) |
| 567 | (math-read-number-simple "1721424")))) | 568 | (eval-when-compile |
| 569 | (math-read-number "1721424"))))) | ||
| 568 | ((eq x 'U) | 570 | ((eq x 'U) |
| 569 | (math-format-number (nth 1 (math-date-parts math-fd-date 719164)))) | 571 | (math-format-number (nth 1 (math-date-parts math-fd-date 719164)))) |
| 570 | ((progn | 572 | ((progn |
| @@ -939,8 +941,10 @@ | |||
| 939 | 0 | 941 | 0 |
| 940 | (if (or (eq this 'j) | 942 | (if (or (eq this 'j) |
| 941 | (math-integerp num)) | 943 | (math-integerp num)) |
| 942 | (math-read-number-simple "1721424") | 944 | (eval-when-compile |
| 943 | (math-read-number-simple "1.7214235")))) | 945 | (math-read-number "1721424")) |
| 946 | (eval-when-compile | ||
| 947 | (math-read-number "1.7214235"))))) | ||
| 944 | hour (or (nth 3 num) hour) | 948 | hour (or (nth 3 num) hour) |
| 945 | minute (or (nth 4 num) minute) | 949 | minute (or (nth 4 num) minute) |
| 946 | second (or (nth 5 num) second) | 950 | second (or (nth 5 num) second) |
| @@ -1149,15 +1153,20 @@ | |||
| 1149 | (defun calcFunc-julian (date &optional zone) | 1153 | (defun calcFunc-julian (date &optional zone) |
| 1150 | (if (math-realp date) | 1154 | (if (math-realp date) |
| 1151 | (list 'date (if (math-integerp date) | 1155 | (list 'date (if (math-integerp date) |
| 1152 | (math-sub date (math-read-number-simple "1721424")) | 1156 | (math-sub date (eval-when-compile |
| 1157 | (math-read-number "1721424"))) | ||
| 1153 | (setq date (math-sub date | 1158 | (setq date (math-sub date |
| 1154 | (math-read-number-simple "1.7214235"))) | 1159 | (eval-when-compile |
| 1160 | (math-read-number "1.7214235")))) | ||
| 1155 | (math-sub date (math-div (calcFunc-tzone zone date) | 1161 | (math-sub date (math-div (calcFunc-tzone zone date) |
| 1156 | '(float 864 2))))) | 1162 | '(float 864 2))))) |
| 1157 | (if (eq (car date) 'date) | 1163 | (if (eq (car date) 'date) |
| 1158 | (math-add (nth 1 date) (if (math-integerp (nth 1 date)) | 1164 | (math-add (nth 1 date) (if (math-integerp (nth 1 date)) |
| 1159 | (math-read-number-simple "1721424") | 1165 | (eval-when-compile |
| 1160 | (math-add (math-read-number-simple "1.7214235") | 1166 | (math-read-number "1721424")) |
| 1167 | (math-add | ||
| 1168 | (eval-when-compile | ||
| 1169 | (math-read-number "1.7214235")) | ||
| 1161 | (math-div (calcFunc-tzone zone date) | 1170 | (math-div (calcFunc-tzone zone date) |
| 1162 | '(float 864 2))))) | 1171 | '(float 864 2))))) |
| 1163 | (math-reject-arg date 'datep)))) | 1172 | (math-reject-arg date 'datep)))) |