• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/calc/

Lines Matching defs:year

173 		      (nth arg '(nil "year" "mnth" "day" "hour" "minu"
175 (list (nth arg '(nil calcFunc-year calcFunc-month
228 (defun calc-new-year (arg)
375 ;;; A "dt" is a list of the form, (year month day), corresponding to
376 ;;; an integer code, or (year month day hour minute second), corresponding
389 (year (math-quotient (math-add date (if (Math-lessp date 711859)
395 (while (Math-lessp date (setq temp (math-absolute-from-date year 1 1)))
396 (setq year (math-add year -1)))
397 (if (eq year 0) (setq year -1))
399 (and (eq year 1752) (>= date 247)
401 (setq temp (if (math-leap-year-p year)
408 (list year month day)
409 (list year month day
443 (defun math-this-year ()
446 (defun math-leap-year-p (year)
447 (if (Math-lessp year 1752)
448 (if (math-negp year)
449 (= (math-imod (math-neg year) 4) 1)
450 (= (math-imod year 4) 0))
451 (setq year (math-imod year 400))
452 (or (and (= (% year 4) 0) (/= (% year 100) 0))
453 (= year 0))))
455 (defun math-days-in-month (year month)
456 (if (and (= month 2) (math-leap-year-p year))
460 (defun math-day-number (year month day)
461 (let ((day-of-year (+ day (* 31 (1- month)))))
464 (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10)))
465 (if (math-leap-year-p year)
466 (setq day-of-year (1+ day-of-year)))))
467 (and (eq year 1752)
470 (setq day-of-year (- day-of-year 11)))
471 day-of-year))
473 (defun math-absolute-from-date (year month day)
474 (if (eq year 0) (setq year -1))
475 (let ((yearm1 (math-sub year 1)))
476 (math-sub (math-add (math-day-number year month day)
478 (if (math-posp year)
481 (math-quotient (math-sub 3 year)
483 (if (or (Math-lessp year 1753)
484 (and (eq year 1752) (<= month 9)))
511 ;; The variables math-fd-date, math-fd-dt, math-fd-year,
518 (defvar math-fd-year)
536 math-fd-year math-fd-month math-fd-day math-fd-weekday
570 math-fd-year (car math-fd-dt)
579 (math-negp math-fd-year)
580 (setq math-fd-year (math-neg math-fd-year)
583 (if (and (integerp math-fd-year) (> math-fd-year 1940) (< math-fd-year 2040))
587 (% math-fd-year 100))
588 (if (and (natnump math-fd-year) (< math-fd-year 100))
589 (format "+%d" math-fd-year)
590 (math-format-number math-fd-year))))
592 (math-format-number math-fd-year))
594 (if (and (natnump math-fd-year) (< math-fd-year 100))
595 (format "+%d" math-fd-year)
596 (math-format-number math-fd-year)))
657 (format "%d" (math-day-number math-fd-year math-fd-month math-fd-day)))
659 (format "%03d" (math-day-number math-fd-year math-fd-month math-fd-day)))
661 (format "%3d" (math-day-number math-fd-year math-fd-month math-fd-day)))
725 (year nil) (month nil) (day nil) (weekday nil)
783 ;; If there is a huge number other than the year, ignore it.
791 ;; If there is a number with a sign or a large number, it is a year.
794 (setq year (math-match-substring math-pd-str 1)
797 year (math-read-number year)
810 (setq temp (+ (if year 1 0) (if month 1 0) (if day 1 0)
814 (if (or (< temp 2) (and year (= temp 2)))
816 (if (= temp 2) ; if year omitted, assume current year
817 (setq year (math-this-year)))))
819 ;; A large number must be a year.
820 (or year
822 (setq year a a b b c c nil)
824 (setq year b b c c nil)
826 (setq year c c nil)))))
829 (if year
838 (if (and year day)
840 (if (and year month)
848 (or year (setq year a a b b c)))
858 (or year (setq year a a b b c))))
861 (setq year (math-neg (math-abs year))))
863 (math-parse-date-validate year bigyear month day
866 (defun math-parse-date-validate (year bigyear month day hour minute second)
867 (and (not bigyear) (natnump year) (< year 100)
868 (setq year (+ year (if (< year 40) 2000 1900))))
869 (if (eq year 0)
873 (if (or (< day 1) (> day (math-days-in-month year month)))
883 (list 'date (math-dt-to-date (append (list year month day)
906 (year nil) (month nil) (day nil) (bigyear nil) (yearday nil)
944 year (car num)
958 year (car num)
989 (setq year (math-match-substring math-pd-str 0)
993 year (math-read-number year))))
1050 (or year (setq year (math-this-year)))
1053 (setq year (math-neg (math-abs year))))
1054 (setq day (math-parse-date-validate year bigyear month day
1073 (defun calcFunc-year (date)
1139 (list 'date (math-dt-to-date (list (math-this-year) date month)))))
1421 (if (math-leap-year-p (car dt)) 366 365))))
1434 (year (car dt))
1439 year (math-add year extra)
1440 day (min day (math-days-in-month year month)))
1441 (and (math-posp (car dt)) (not (math-posp year))
1442 (setq year (math-sub year 1))) ; did we go past the year zero?
1443 (and (math-negp (car dt)) (not (math-negp year))
1444 (setq year (math-add year 1)))
1446 (cons year (cons month (cons day (cdr (cdr (cdr dt))))))))))
1497 (defun math-to-business-day (date &optional need-year)
1507 (or (not need-year) (eq (car dt) need-year)
1508 (math-reject-arg (list 'date day) "*Generated holiday has wrong year"))
1566 ;; The variable math-sh-year is local to math-setup-holidays
1567 ;; and math-setup-year-holiday, but is used by math-setup-add-holidays,
1568 ;; which is called by math-setup-holidays and math-setup-year-holiday.
1569 (defvar math-sh-year)
1634 (let ((year (calcFunc-year date))
1637 (or (eq (calcFunc-in year (nth 4 math-holidays-cache)) 1)
1644 (let ((math-sh-year nil)) ; see below
1652 (setcar (nthcdr 5 math-holidays-cache) (cons year year))
1653 (math-setup-year-holidays year)
1655 ((< year (car limits))
1657 year (1- (car limits)))
1659 (while (< year (car limits))
1661 (math-setup-year-holidays (car limits)))
1663 ((> year (cdr limits))
1665 (1+ (cdr limits)) year)
1667 (while (> year (cdr limits))
1669 (math-setup-year-holidays (cdr limits)))
1676 (defun math-setup-year-holidays (math-sh-year)
1679 (let* ((var-y math-sh-year)
1689 (defun math-setup-add-holidays (days) ; uses "math-sh-year"
1704 (let ((b (math-to-business-day days math-sh-year)))