summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-forms.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2007-06-22 04:09:00 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2007-06-22 04:09:00 +0000
commit3b6d80bc94a396997cdeab4706fa3373a6cc9fb5 (patch)
tree50d261ca4a91125abc646aec87d8f59c713b0745 /lisp/calc/calc-forms.el
parentf9e09a51db6ce66cffa545eea54d516e082460d3 (diff)
downloademacs-3b6d80bc94a396997cdeab4706fa3373a6cc9fb5.tar.gz
(math-format-date-part,math-parse-standard-date,calcFunc-julian):
Use `math-read-number-simple' to insert bignums.
Diffstat (limited to 'lisp/calc/calc-forms.el')
-rw-r--r--lisp/calc/calc-forms.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index 10bbf7dc3dd..7d4065c40ee 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -558,9 +558,13 @@
((eq x 'n)
(math-format-number (math-floor math-fd-date)))
((eq x 'J)
- (math-format-number (math-add math-fd-date '(float (bigpos 235 214 17) -1))))
+ (math-format-number
+ (math-add math-fd-date
+ (math-read-number-simple "1.7214235"))))
((eq x 'j)
- (math-format-number (math-add (math-floor math-fd-date) '(bigpos 424 721 1))))
+ (math-format-number (math-add
+ (math-floor math-fd-date)
+ (math-read-number-simple "1721424"))))
((eq x 'U)
(math-format-number (nth 1 (math-date-parts math-fd-date 719164))))
((progn
@@ -935,9 +939,8 @@
0
(if (or (eq this 'j)
(math-integerp num))
- '(bigpos 424 721 1)
- '(float (bigpos 235 214 17)
- -1))))
+ (math-read-number-simple "1721424")
+ (math-read-number-simple "1.7214235"))))
hour (or (nth 3 num) hour)
minute (or (nth 4 num) minute)
second (or (nth 5 num) second)
@@ -1146,14 +1149,15 @@
(defun calcFunc-julian (date &optional zone)
(if (math-realp date)
(list 'date (if (math-integerp date)
- (math-sub date '(bigpos 424 721 1))
- (setq date (math-sub date '(float (bigpos 235 214 17) -1)))
+ (math-sub date (math-read-number-simple "1721424"))
+ (setq date (math-sub date
+ (math-read-number-simple "1.7214235")))
(math-sub date (math-div (calcFunc-tzone zone date)
'(float 864 2)))))
(if (eq (car date) 'date)
(math-add (nth 1 date) (if (math-integerp (nth 1 date))
- '(bigpos 424 721 1)
- (math-add '(float (bigpos 235 214 17) -1)
+ (math-read-number-simple "1721424")
+ (math-add (math-read-number-simple "1.7214235")
(math-div (calcFunc-tzone zone date)
'(float 864 2)))))
(math-reject-arg date 'datep))))