MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.116.170.100
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/calendar/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/calendar/time-date.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:08:30 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/calendar/time-date.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@649 Decode a time value and bind it according to VARLIST, then eval BODY.

The value of the last form in BODY is returned.

Each element of the list VARLIST is a list of the form
(HIGH-SYMBOL LOW-SYMBOL MICRO-SYMBOL [PICO-SYMBOL [TYPE-SYMBOL]] TIME-VALUE).
The time value TIME-VALUE is decoded and the result it bound to
the symbols HIGH-SYMBOL, LOW-SYMBOL and MICRO-SYMBOL.
The optional PICO-SYMBOL is bound to the picoseconds part.

The optional TYPE-SYMBOL is bound to the type of the time value.
Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH
LOW), type 2 is the list (HIGH LOW MICRO), and type 3 is the
list (HIGH LOW MICRO PICO).
(defalias 'with-decoded-time-value '(macro . #[(varlist &rest body) "\203\357\211A@\211\211A@	\211A@	\211A@	G\306X?\205)	\211A@	G\307=?\2057	\211A@	@ \310\311!!\312\313! D\n\314!DD\fF
\205X
C\205`C#\315\316!D\317\320\314!DE\315!\317\320\f\321!DE
\203\250\315\322!D\313\320
\323!DE\205\223\324B\"\313\320
\325BB\205\243\326B\"F\202\256\205\256\327E\313\320\f\330BB
\205\274
\331B\205\305\332B#FE\313\320!\f\333BBBB
\205\332
\334B\205\343\335B#F\336\"BBF.\207\317\"B\207" [varlist elt high low micro pico 2 1 make-symbol "time" let* append pop if consp progn setq car cdr cadr (3) (0) (2) (setq type 2) (0) (0) (1) (0) (0) (0) with-decoded-time-value type time-value gensym body] 18 (#$ . 562)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put with-decoded-time-value lisp-indent-function 1 edebug-form-spec ((&rest (symbolp symbolp symbolp &or [symbolp form] form)) body)] 4)
#@331 Encode HIGH, LOW, MICRO, and PICO into a time value of type TYPE.
Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH LOW),
type 2 is (HIGH LOW MICRO), and type 3 is (HIGH LOW MICRO PICO).

For backward compatibility, if only four arguments are given,
it is assumed that PICO was omitted and should be treated as zero.
(defalias 'encode-time-value #[(high low micro pico &optional type) "\305=\203\n	\nB\207\306=\203	\nD\207\307=\203	\nE\207\310=\203+	\n\fF\207?\2057\311	\n\305\f%\207" [type high low micro pico 0 1 2 3 encode-time-value] 6 (#$ . 2176)])
(byte-code "\300\301\302\"\210\300\303\304\"\207" [autoload parse-time-string "parse-time" timezone-make-date-arpa-standard "timezone"] 3)
#@126 Parse a string DATE that represents a date-time and return a time value.
If DATE lacks timezone information, GMT is assumed.
(defalias 'date-to-time #[(date) "\300\301\302\217\207" [nil (byte-code "\301\302\303!\"\207" [date apply encode-time parse-time-string] 4) ((error (byte-code "\300\301\302\217\207" [nil (byte-code "\301\302\303\304!!\"\207" [date apply encode-time parse-time-string timezone-make-date-arpa-standard] 5) ((error (error "Invalid date: %s" date)))] 3)))] 3 (#$ . 2904)])
#@60 Convert SECONDS (a floating point number) to a time value.
(defalias 'seconds-to-time #[(seconds) "\306\307\"\310_\311\306	\307\"\310_!\312	!\312\306\313\"!\312\313\"\n\310=\203A\314T\211\310=\203A\314\fT\211\313=\203A\314
T
\f\nF-\207" [seconds usec ps us lo hi mod 1 1000000 round floor 65536 0] 5 (#$ . 3406)])
#@64 Return non-nil if time value T1 is earlier than time value T2.
(defalias 'time-less-p #[(t1 t2) "\211\211A@\306\211\306\211	:\203H	\211A@	\203>	@	A\2036	\211\fA@)\307\202Q\310\311\202Q\310\211\312\202Q	\310\211\310
\211\211A@\306\211\306\211:\203\255\211A@\203\241@A\203\230\211\fA@)\307\202\272\310\311\202\272\310\211\312\202\272\310\211\310\nW\206\350\nU\205\350W\206\350U\205\350\fW\206\350\fU\205\350
W.\f\207" [t1 #1=#:time high1 low1 micro1 pico1 nil 3 0 2 1 type1 x t2 #2=#:time high2 low2 micro2 pico2 type2] 3 (#$ . 3745)])
#@33 Convert DAYS into a time value.
(defalias 'days-to-time #[(days) "\303\304\305#\306\307\310\217\211\306\311\312\217*D\207" [days seconds high * 1.0 86400 nil (byte-code "\301\302\245!\207" [seconds floor 65536] 3) ((range-error most-positive-fixnum)) (byte-code "\302\303\304	\305#Z!\207" [seconds high floor * 1.0 65536] 6) ((range-error 65535))] 5 (#$ . 4405)])
#@95 Return the time elapsed since TIME.
TIME should be either a time value or a date-time string.
(defalias 'time-since #[(time) ";\203	\301!\302\303 \"\207" [time date-to-time time-subtract current-time] 3 (#$ . 4780)])
(defalias 'subtract-time 'time-subtract)
#@93 Subtract two time values, T1 minus T2.
Return the difference in the format of a time value.
(defalias 'time-subtract #[(t1 t2) "\211\211A@\306\211\306\211	:\203H	\211A@	\203>	@	A\2036	\211A@)\307\202Q\310\311\202Q\310\211\312\202Q	\310\211\310\211\211A@\306\211\306\211:\203\255\211A@\203\241@A\203\230\211A@)\307\202\272\310\311\202\272\310\211\312\202\272\310\211\310\nZZ\fZ
Z]
\310W\203\342\fS
\313\\\f\310W\203\357S\f\313\\\310W\203\374\nS\314\\\315\n\f
%.\f\207" [t1 #1=#:time high low micro pico nil 3 0 2 1 1000000 65536 encode-time-value type x t2 #2=#:time high2 low2 micro2 pico2 type2] 7 (#$ . 5049)])
#@73 Add two time values T1 and T2.  One should represent a time difference.
(defalias 'time-add #[(t1 t2) "\211\211A@\306\211\306\211	:\203H	\211A@	\203>	@	A\2036	\211A@)\307\202Q\310\311\202Q\310\211\312\202Q	\310\211\310\211\211A@\306\211\306\211:\203\255\211A@\203\241@A\203\230\211A@)\307\202\272\310\311\202\272\310\211\312\202\272\310\211\310\n\\\\\f\\
\\]
\313Y\203\342\fT
\313Z\f\313Y\203\357T\f\313Z\314Y\203\374\nT\314Z\315\n\f
%.\f\207" [t1 #1=#:time high low micro pico nil 3 0 2 1 1000000 65536 encode-time-value type x t2 #2=#:time high2 low2 micro2 pico2 type2] 7 (#$ . 5803)])
#@87 Return the number of days between year 1 and DATE.
DATE should be a date-time string.
(defalias 'date-to-day #[(date) "\301\302!!\207" [date time-to-days date-to-time] 3 (#$ . 6533)])
#@97 Return the number of days between DATE1 and DATE2.
DATE1 and DATE2 should be date-time strings.
(defalias 'days-between #[(date1 date2) "\302!\302	!Z\207" [date1 date2 date-to-day] 3 (#$ . 6724)])
#@34 Return t if YEAR is a leap year.
(defalias 'date-leap-year-p #[(year) "\301\302\246!\203\301\303\246!?\206\301\304\246!\207" [year zerop 4 100 400] 3 (#$ . 6928)])
#@62 Return the day number within the year corresponding to TIME.
(defalias 'time-to-day-in-year #[(time) "\306!\307	8\310	8\311	8\nS\312_\\\n\313V\2030
\314\n\307_\\\315\245Z\316\f!\2030
T
-\207" [time tim month day year day-of-year decode-time 4 3 5 31 2 23 10 date-leap-year-p] 4 (#$ . 7105)])
#@159 The number of days between the Gregorian date 0001-12-31bce and TIME.
TIME should be a time value.
The Gregorian date Sunday, December 31, 1bce is imaginary.
(defalias 'time-to-days #[(time) "\303!\304	8\305\306!\nS\307_\nS\310\245\nS\311\245[\nS\312\245%*\207" [time tim year decode-time 5 + time-to-day-in-year 365 4 100 400] 7 (#$ . 7415)])
#@81 Return the number of days represented by TIME.
Returns a floating point number.
(defalias 'time-to-number-of-days #[(time) "\301!\302\245\207" [time float-time 86400] 2 (#$ . 7769)])
#@126 Parse a string DATE that represents a date-time and return a time value.
If DATE is malformed, return a time value of zeros.
(defalias 'safe-date-to-time #[(date) "\300\301\302\217\207" [nil (date-to-time date) ((error '(0 0)))] 3 (#$ . 7960)])
#@867 Use format control STRING to format the number SECONDS.
The valid format specifiers are:
%y is the number of (365-day) years.
%d is the number of days.
%h is the number of hours.
%m is the number of minutes.
%s is the number of seconds.
%z is a non-printing control flag (see below).
%% is a literal "%".

Upper-case specifiers are followed by the unit-name (e.g. "years").
Lower-case specifiers return only the unit.

"%" may be followed by a number specifying a width, with an
optional leading "." for zero-padding.  For example, "%.3Y" will
return something of the form "001 year".

The "%z" specifier does not print anything.  When it is used, specifiers
must be given in order of decreasing size.  To the left of "%z", nothing
is output until the first non-zero unit is encountered.

This function does not work for SECONDS greater than `most-positive-fixnum'.
(defalias 'format-seconds #[(string seconds) "\306\307\310\311\211\211\211\211\211\211\211\211\211\"#$%&'(\312\313)(#\203\212\306\225(\314\315)\"\211%\316\230\204!\317%\227'\"\211$\204O\320\321%\"\210\317%\227#\"\203_\320\322%\"\210$@\323\230\203m\310\"\202\200
\204\200\324$8\f\205}\n\fV\n$#B#\202!\"\203\227
\203\227\320\325!\210'\311*\211+\2038+@\211*@%*\211,A@)\324*8\312\326\327%\")\"\203/%\323\230\203\342\330\331\332)\206\327\306\225\306\224^\311O#)\202/\333-\n\"-	\n_Z-\204\376\334	!?\205\375\306\224\335\326\316\314\315)\"\336Q	\314\324)\"%\230\203\332\202'\326\337	\315U\203%\332\202&\340##\310\211)$)+A\211+\204\242.\330\341\316)#\207" [zeropos num unit name prev larger 0 (("y" "year" 31536000) ("d" "day" 86400) ("h" "hour" 3600) ("m" "minute" 60) ("s" "second" 1) ("z")) t nil string-match "%\\.?[0-9]*\\(.\\)" match-string 1 "%" assoc error "Bad format specifier: `%s'" "Multiple instances of specifier: `%s'" "z" 2 "Units are not in decreasing order of size" format "%%\\(\\.?[0-9]+\\)?\\(%s\\)" replace-regexp-in-string "%z" "" floor zerop replace-match "d%s" " %s%s" "s" "%%" zeroflag usedunits match spec case-fold-search units start string u --dolist-tail-- x seconds] 14 (#$ . 8212)])
(provide 'time-date)

MMCT - 2023