• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/calendar/

Lines Matching +defs:time +defs:date

58 (defvar date)
70 (defcustom calendar-time-display-form
72 (if time-zone " (") time-zone (if time-zone ")"))
73 "*The pseudo-pattern that governs the way a time of day is formatted.
77 and `am-pm' and `time-zone', both alphabetic strings.
82 (if time-zone \" (\") time-zone (if time-zone \")\"))
197 (defvar solar-sidereal-time-greenwich-midnight
199 "Sidereal time at Greenwich at midnight (universal time).")
206 "Prompt user for latitude, longitude, and time zone."
216 (if (not calendar-time-zone)
217 (setq calendar-time-zone
301 (defun solar-sunrise-and-sunset (time latitude longitude height)
307 time. For instance, the pair corresponding to November 28, 1995 at 16 UT is
317 (let* ((rise-time (solar-moment -1 latitude longitude time height))
318 (set-time (solar-moment 1 latitude longitude time height))
320 (if (not (and rise-time set-time))
327 (setq day-length (- set-time rise-time)))
328 (list (if rise-time (+ rise-time (/ calendar-time-zone 60.0)) nil)
329 (if set-time (+ set-time (/ calendar-time-zone 60.0)) nil)
332 (defun solar-moment (direction latitude longitude time height)
339 time. For instance, the pair corresponding to November 28, 1995 at 16 UT is
348 (let* ((ut (car (cdr time)))
351 (utmax ut) ; the time searched is between utmin and utmax
356 (t0 (car time))
383 (defun solar-time-string (time time-zone)
385 Format used is given by `calendar-time-display-form'."
386 (let* ((time (round (* 60 time)))
387 (24-hours (/ time 60))
388 (minutes (format "%02d" (% time 60)))
392 (mapconcat 'eval calendar-time-display-form "")))
395 (defun solar-daylight (time)
396 "Printable form for time expressed in hours."
398 (floor time)
399 (floor (* 60 (- time (floor time))))))
401 (defun solar-exact-local-noon (date)
402 "Date and Universal Time of local noon at *local date* date.
404 The date may be different from the one asked for, but it will be the right
405 local date. The second component of date should be an integer."
406 (let* ((nd date)
408 (te (solar-time-equation date ut)))
412 (setq nd (list (car date) (+ 1 (car (cdr date)))
413 (car (cdr (cdr date)))))
417 (setq nd (list (car date) (- (car (cdr date)) 1)
418 (car (cdr (cdr date)))))
422 ; date standardization
425 (defun solar-sunrise-sunset (date)
430 (exact-local-noon (solar-exact-local-noon date))
431 ; get the time from the 2000 epoch.
433 ; store the sidereal time at Greenwich at midnight of UT time.
436 (progn (setq solar-sidereal-time-greenwich-midnight
437 (solar-sidereal-time t0))
455 (adj-rise (if rise (dst-adjust-time date rise) nil))
457 (adj-set (if set (dst-adjust-time date set) nil))
460 (and rise (calendar-date-equal date (car adj-rise)) (cdr adj-rise))
461 (and set (calendar-date-equal date (car adj-set)) (cdr adj-set))
464 (defun solar-sunrise-sunset-string (date)
466 (let ((l (solar-sunrise-sunset date)))
470 (concat "Sunrise " (apply 'solar-time-string (car l)))
473 (concat "sunset " (apply 'solar-time-string (car (cdr l))))
478 (defun solar-julian-ut-centuries (date)
480 (/ (- (calendar-absolute-from-gregorian date)
484 (defun solar-ephemeris-time(time)
489 time. For instance, the pair corresponding to November 28, 1995 at 16 UT is
493 Result is in julian centuries of ephemeris time."
494 (let* ((t0 (car time))
495 (ut (car (cdr time)))
501 (defun solar-date-next-longitude (d l)
504 local time (including any daylight saving rules).
508 Result is in local time expressed astronomical (Julian) day numbers.
511 calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
512 calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
513 calendar-time-zone are used to interpret local time."
538 (time latitude longitude for-sunrise-sunset)
543 time. For instance, the pair corresponding to November 28, 1995 at 16 UT is
548 (let* ((ut (car (cdr time)))
549 (ec (solar-equatorial-coordinates time for-sunrise-sunset))
550 (st (+ solar-sidereal-time-greenwich-midnight
568 (defun solar-equatorial-coordinates (time for-sunrise-sunset)
573 time. For instance, the pair corresponding to November 28, 1995 at 16 UT is
576 (let* ((tm (solar-ephemeris-time time))
581 (defun solar-ecliptic-coordinates (time for-sunrise-sunset)
583 equation of time (in hours) and nutation in longitude (in seconds)
584 at moment `time', expressed in julian centuries of Ephemeris Time
587 (* 36000.76983 time)
588 (* 0.0003032 time time))) ; sun mean longitude
590 (* 481267.8813 time))) ; moon mean longitude
592 (* 35999.05030 time)
593 (* -0.0001559 time time)
594 (* -0.00000048 time time time))) ; sun mean anomaly
595 (i (+ 23.43929111 (* -0.013004167 time)
596 (* -0.00000016389 time time)
597 (* 0.0000005036 time time time))); mean inclination
599 (* -0.004817 time)
600 (* -0.000014 time time))
602 (* (+ 0.019993 (* -0.000101 time))
608 (* -1934.136 time))) ; longitude of moon's ascending node
619 (* -0.000042037 time)
620 (* -0.0000001236 time time)) ; eccentricity of earth's orbit
630 (time-eq (if (not for-sunrise-sunset)
639 ; equation of time, in hours
640 (list app i time-eq nut)))
699 calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
700 calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
701 calendar-time-zone are used to interpret local time."
704 (date (calendar-astro-from-absolute
707 (/ calendar-daylight-time-offset 24.0 60.0) 0)
708 (/ calendar-time-zone 60.0 24.0))))
710 (date (+ date (solar-ephemeris-correction
715 date)))))))
716 (U (/ (- date 2451545) 3652500))
737 "Ephemeris time minus Universal Time during Gregorian year.
797 (defun solar-sidereal-time (t0)
798 "Sidereal time (in hours) in Greenwich.
800 At T0=Julian centuries of universal time.
802 (let* ((mean-sid-time (+ 6.6973746
806 (et (solar-ephemeris-time (list t0 0.0)))
810 (mod (+ (mod (+ mean-sid-time
815 (defun solar-time-equation (date ut)
816 "Equation of time expressed in hours at Gregorian DATE at Universal time UT."
817 (let* ((et (solar-date-to-et date ut))
821 (defun solar-date-to-et (date ut)
824 (let ((t0 (solar-julian-ut-centuries date)))
825 (solar-ephemeris-time (list t0 ut))))
829 "Local time of sunrise and sunset for today. Accurate to a few seconds.
830 If called with an optional prefix argument, prompt for date.
833 latitude, time zone, and date, and always use standard time.
839 (not (and calendar-latitude calendar-longitude calendar-time-zone)))
849 (calendar-time-zone
850 (if (< arg 16) calendar-time-zone
872 (calendar-standard-time-zone-name
873 (if (< arg 16) calendar-standard-time-zone-name
874 (cond ((= calendar-time-zone 0) "UTC")
875 ((< calendar-time-zone 0)
876 (format "UTC%dmin" calendar-time-zone))
877 (t (format "UTC+%dmin" calendar-time-zone)))))
882 (date (if (< arg 4) (calendar-current-date) (calendar-read-date)))
883 (date-string (calendar-date-string date t))
884 (time-string (solar-sunrise-sunset-string date))
885 (msg (format "%s: %s" date-string time-string))
890 (princ (concat date-string "\n" time-string)))
900 "Local time of sunrise and sunset for date under cursor.
903 (if (not (and calendar-latitude calendar-longitude calendar-time-zone))
905 (let ((date (calendar-cursor-to-date t)))
907 (calendar-date-string date t t)
908 (solar-sunrise-sunset-string date))))
911 "Local time of sunrise and sunset as a diary entry.
913 (if (not (and calendar-latitude calendar-longitude calendar-time-zone))
915 (solar-sunrise-sunset-string date))
924 "Local time of candle lighting diary entry--applies if date is a Friday.
925 No diary entry if there is no sunset on that date.
929 (if (not (and calendar-latitude calendar-longitude calendar-time-zone))
931 (if (= (% (calendar-absolute-from-gregorian date) 7) 5);; Friday
932 (let* ((sunset (car (cdr (solar-sunrise-sunset date))))
940 (apply 'solar-time-string light)))))))
973 RESULT is a gregorian local date.
988 ; ephemeris time correction
990 (date (calendar-gregorian-from-absolute (floor (- JD 1721424.5))))
991 (time (- (- JD 0.5) (floor (- JD 0.5))))
993 (list (car date) (+ (car (cdr date)) time
994 (/ (/ calendar-time-zone 60.0) 24.0))
995 (car (cdr (cdr date))))))
1049 "*local* date and time of equinoxes and solstices, if visible in the calendar window.
1056 (let* ((calendar-standard-time-zone-name
1057 (if calendar-time-zone calendar-standard-time-zone-name "UTC"))
1059 (if calendar-time-zone calendar-daylight-savings-starts))
1061 (if calendar-time-zone calendar-daylight-savings-ends))
1062 (calendar-time-zone (if calendar-time-zone calendar-time-zone 0))
1067 (adj (dst-adjust-time d1 h0))
1073 ;(d0 (solar-date-next-longitude
1087 (solar-time-string
1090 calendar-daylight-time-zone-name
1091 calendar-standard-time-zone-name))))))))