;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib dash s] 2) #@33 Default format for `ts-format'. (defvar ts-default-format "%Y-%m-%d %H:%M:%S %z" (#$ . 167)) #@592 Like `cl-defstruct', but with additional slot options. Additional slot options and values: `:accessor-init': a sexp that initializes the slot in the accessor if the slot is nil. The symbol `struct' will be bound to the current struct. The accessor is defined after the struct is fully defined, so it may refer to the struct definition (e.g. by using the `cl-struct' `pcase' macro). `:aliases': A list of symbols which will be aliased to the slot accessor, prepended with the struct name (e.g. a struct `ts' with slot `year' and alias `y' would create an alias `ts-y'). (fn &rest ARGS) (defalias 'ts-defstruct '(macro . #[128 "\211@A\300\301BB!\302\211\302\303:\203\372@\262<\203\357\211A\262\242A\304\305\"\304\306\"\307\310!\311\310!Q!\312\313#\307\310!\314P!\315\316\317\320B\321\322\323\324D\325BBEE \205q\326\327\330E\331\330FE\327\330E\257\211B\262\211:\203\271\211@:\203\262\211@\242\211\315=\203\261@\243\211:\203\260\211\242\211\211 =\262\203\257\211\211\302\240\266\210\210\210\211A\262\202\200\210\302\211\211:\203\355@\262\307\310!\311\310!Q!\262\332\324D\324\nDEB\262A\262\302\262\202\276\266 A\262\211T\262\202\266\333\334\"BB\207" [macroexpand cl-defstruct nil 1 plist-get :accessor-init :aliases intern symbol-name "-" format "Access slot \"%s\" of `%s' struct STRUCT." "-p" cl-defsubst (struct) or (struct) signal 'wrong-type-argument list quote (struct) unless aref struct aset defalias progn append] 28 (#$ . 267)])) (byte-code "\300\301\302\303#\300\207" [function-put ts-defstruct lisp-indent-function defun] 4) #@61 compiler-macro for inlining `ts-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'ts-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ts-p (and (memq (type-of cl-x) cl-struct-ts-tags) t)) nil] 9 (#$ . 1898)]) (put 'ts-p 'compiler-macro 'ts-p--cmacro) #@13 (fn CL-X) (defalias 'ts-p #[257 "\301!>\205 \302\207" [cl-struct-ts-tags type-of t] 3 (#$ . 2184)]) (byte-code "\300\301\302\303#\304\305\306\301#\210\307\310\311\"\207" [function-put ts-p side-effect-free error-free put ts cl-deftype-satisfies defalias copy-ts copy-sequence] 5) #@188 compiler-macro for inlining `make-ts'. (fn CL-WHOLE &cl-quote &key HOUR MINUTE SECOND DAY MONTH YEAR DOW DAY-ABBR DAY-NAME DOY WOY MONTH-ABBR MONTH-NAME TZ-ABBR TZ-OFFSET INTERNAL UNIX) (defalias 'make-ts--cmacro #[385 "\300\301\"A@\300\302\"A@\300\303\"A@\300\304\"A@\300\305\"A@\300\306\"A@\300\307\"A@\300\310\"A@\300 \311\"A@\300\n\312\"A@\300 \313\"A@\300\f\314\"A@\300 \315\"A@\300\316\"A@\300\317\"A@\300\320\"A@\300\321\"A@\211\203\237\211@\322>\203\207\211AA\262\202t\323>A@\203\226\324\262\202t\325\326@\"\210\202t\210\327\330\331\324\324&\207" [plist-member :hour :minute :second :day :month :year :dow :day-abbr :day-name :doy :woy :month-abbr :month-name :tz-abbr :tz-offset :internal :unix (:hour :minute :second :day :month :year :dow :day-abbr :day-name :doy :woy :month-abbr :month-name :tz-abbr :tz-offset :internal :unix :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:hour :minute :second :day :month :year :dow :day-abbr :day-name :doy :woy :month-abbr :month-name :tz-abbr :tz-offset :internal :unix)" cl--defsubst-expand (hour minute second day month year dow day-abbr day-name doy woy month-abbr month-name tz-abbr tz-offset internal unix) (cl-block make-ts (record 'ts hour minute second day month year dow day-abbr day-name doy woy month-abbr month-name tz-abbr tz-offset internal unix))] 42 (#$ . 2476)]) (put 'make-ts 'compiler-macro 'make-ts--cmacro) #@168 Constructor for objects of type `ts'. (fn &key HOUR MINUTE SECOND DAY MONTH YEAR DOW DAY-ABBR DAY-NAME DOY WOY MONTH-ABBR MONTH-NAME TZ-ABBR TZ-OFFSET INTERNAL UNIX) (defalias 'make-ts #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\300\304\"A@\300\305\"A@\300\306\"A@\300\307\"A@\300\310\"A@\300 \311\"A@\300\n\312\"A@\300 \313\"A@\300\f\314\"A@\300 \315\"A@\300\316\"A@\300\317\"A@\300\320\"A@\300\321\"A@\211\203\237\211@\322>\203\207\211AA\262\202t\323>A@\203\226\324\262\202t\325\326@\"\210\202t\210\327\330&\207" [plist-member :hour :minute :second :day :month :year :dow :day-abbr :day-name :doy :woy :month-abbr :month-name :tz-abbr :tz-offset :internal :unix (:hour :minute :second :day :month :year :dow :day-abbr :day-name :doy :woy :month-abbr :month-name :tz-abbr :tz-offset :internal :unix :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:hour :minute :second :day :month :year :dow :day-abbr :day-name :doy :woy :month-abbr :month-name :tz-abbr :tz-offset :internal :unix)" record ts] 37 (#$ . 3971)]) (byte-code "\300\301\302\303#\304\305\306\307\310\306\311\312\305\303& \207" [function-put make-ts side-effect-free t cl-struct-define ts nil cl-structure-object record ((cl-tag-slot) (hour nil :accessor-init (string-to-number (format-time-string "%H" (ts-unix struct))) :aliases (H) :constructor "%H" :type integer) (minute nil :accessor-init (string-to-number (format-time-string "%M" (ts-unix struct))) :aliases (min M) :constructor "%M" :type integer) (second nil :accessor-init (string-to-number (format-time-string "%S" (ts-unix struct))) :aliases (sec S) :constructor "%S" :type integer) (day nil :accessor-init (string-to-number (format-time-string "%d" (ts-unix struct))) :aliases (day-of-month-num dom d) :constructor "%d" :type integer) (month nil :accessor-init (string-to-number (format-time-string "%m" (ts-unix struct))) :aliases (month-num moy m) :constructor "%m" :type integer) (year nil :accessor-init (string-to-number (format-time-string "%Y" (ts-unix struct))) :aliases (Y) :constructor "%Y" :type integer) (dow nil :accessor-init (string-to-number (format-time-string "%w" (ts-unix struct))) :aliases (day-of-week-num) :constructor "%w" :type integer) (day-abbr nil :accessor-init (format-time-string "%a" (ts-unix struct)) :aliases (day-of-week-abbr) :constructor "%a") (day-name nil :accessor-init (format-time-string "%A" (ts-unix struct)) :aliases (day-of-week-name) :constructor "%A") (doy nil :accessor-init (string-to-number (format-time-string "%j" (ts-unix struct))) :aliases (day-of-year) :constructor "%j" :type integer) (woy nil :accessor-init (string-to-number (format-time-string "%V" (ts-unix struct))) :aliases (week week-of-year) :constructor "%V" :type integer) (month-abbr nil :accessor-init (format-time-string "%b" (ts-unix struct)) :aliases (b) :constructor "%b") (month-name nil :accessor-init (format-time-string "%B" (ts-unix struct)) :aliases (B) :constructor "%B") (tz-abbr nil :accessor-init (format-time-string "%Z" (ts-unix struct)) :constructor "%Z") (tz-offset nil :accessor-init (format-time-string "%z" (ts-unix struct)) :constructor "%z") (internal nil :accessor-init (apply #'encode-time (decode-time (ts-unix struct)))) (unix nil :accessor-init (pcase-let* (((cl-struct ts second minute hour day month year) struct)) (if (and second minute hour day month year) (float-time (encode-time second minute hour day month year)) (float-time))))) cl-struct-ts-tags] 11) #@66 compiler-macro for inlining `ts-unix'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-unix--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-unix (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 17) (aset struct 17 (pcase-let* (((cl-struct ts second minute hour day month year) struct)) (if (and second minute hour day month year) (float-time (encode-time second minute hour day month year)) (float-time))))) (aref struct 17)) nil] 9 (#$ . 7517)]) (put 'ts-unix 'compiler-macro 'ts-unix--cmacro) #@56 Access slot "unix" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-unix #[257 "\301!>\204\302\303\304D\"\210\211\305H\204e\211\305\306H\307H\310H\311H\312H\313H\203_\203_\203_\203_\203_\211\203_\314\315&!\266\214\202c\314 \266\214I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 23 (#$ . 8093)]) #@70 compiler-macro for inlining `ts-internal'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-internal--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-internal (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 16) (aset struct 16 (apply #'encode-time (decode-time (ts-unix struct))))) (aref struct 16)) nil] 9 (#$ . 8509)]) (put 'ts-internal 'compiler-macro 'ts-internal--cmacro) #@60 Access slot "internal" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-internal #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\315H \316H\f\317H\203\203\203\203\203\211\203\320\307&!\266\214\202\203\320 \266\214I\210\311H!\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 16 apply encode-time decode-time 17 3 2 1 4 5 6 float-time] 28 (#$ . 8966)]) #@71 compiler-macro for inlining `ts-tz-offset'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-tz-offset--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-tz-offset (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 15) (aset struct 15 (format-time-string "%z" (ts-unix struct)))) (aref struct 15)) nil] 9 (#$ . 9505)]) (put 'ts-tz-offset 'compiler-macro 'ts-tz-offset--cmacro) #@61 Access slot "tz-offset" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-tz-offset #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\211\211\305\306\307\301!>\204)\302\303\304D\"\210\310H\204\203\310\311H\312H\313H \314H\n\315H \316H\203}\203}\203}\203}\203}\211\203}\317\320&!\266\214\202\201\317 \266\214I\210\310H\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 15 format-time-string "%z" 17 3 2 1 4 5 6 float-time encode-time] 27 (#$ . 9957)]) #@69 compiler-macro for inlining `ts-tz-abbr'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-tz-abbr--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-tz-abbr (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 14) (aset struct 14 (format-time-string "%Z" (ts-unix struct)))) (aref struct 14)) nil] 9 (#$ . 10497)]) (put 'ts-tz-abbr 'compiler-macro 'ts-tz-abbr--cmacro) #@59 Access slot "tz-abbr" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-tz-abbr #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\211\211\305\306\307\301!>\204)\302\303\304D\"\210\310H\204\203\310\311H\312H\313H \314H\n\315H \316H\203}\203}\203}\203}\203}\211\203}\317\320&!\266\214\202\201\317 \266\214I\210\310H\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 14 format-time-string "%Z" 17 3 2 1 4 5 6 float-time encode-time] 27 (#$ . 10940)]) #@72 compiler-macro for inlining `ts-month-name'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-month-name--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-month-name (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 13) (aset struct 13 (format-time-string "%B" (ts-unix struct)))) (aref struct 13)) nil] 9 (#$ . 11477)]) (put 'ts-month-name 'compiler-macro 'ts-month-name--cmacro) #@62 Access slot "month-name" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-month-name #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\211\211\305\306\307\301!>\204)\302\303\304D\"\210\310H\204\203\310\311H\312H\313H \314H\n\315H \316H\203}\203}\203}\203}\203}\211\203}\317\320&!\266\214\202\201\317 \266\214I\210\310H\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 13 format-time-string "%B" 17 3 2 1 4 5 6 float-time encode-time] 27 (#$ . 11935)]) #@72 compiler-macro for inlining `ts-month-abbr'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-month-abbr--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-month-abbr (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 12) (aset struct 12 (format-time-string "%b" (ts-unix struct)))) (aref struct 12)) nil] 9 (#$ . 12478)]) (put 'ts-month-abbr 'compiler-macro 'ts-month-abbr--cmacro) #@62 Access slot "month-abbr" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-month-abbr #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\211\211\305\306\307\301!>\204)\302\303\304D\"\210\310H\204\203\310\311H\312H\313H \314H\n\315H \316H\203}\203}\203}\203}\203}\211\203}\317\320&!\266\214\202\201\317 \266\214I\210\310H\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 12 format-time-string "%b" 17 3 2 1 4 5 6 float-time encode-time] 27 (#$ . 12936)]) #@65 compiler-macro for inlining `ts-woy'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-woy--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-woy (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 11) (aset struct 11 (string-to-number (format-time-string "%V" (ts-unix struct))))) (aref struct 11)) nil] 9 (#$ . 13479)]) (put 'ts-woy 'compiler-macro 'ts-woy--cmacro) #@55 Access slot "woy" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-woy #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\315H \316H\f\317H\203\203\203\203\203\211\203\320\321&!\266\214\202\203\320 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 11 string-to-number format-time-string "%V" 17 3 2 1 4 5 6 float-time encode-time] 28 (#$ . 13921)]) #@65 compiler-macro for inlining `ts-doy'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-doy--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-doy (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 10) (aset struct 10 (string-to-number (format-time-string "%j" (ts-unix struct))))) (aref struct 10)) nil] 9 (#$ . 14474)]) (put 'ts-doy 'compiler-macro 'ts-doy--cmacro) #@55 Access slot "doy" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-doy #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\315H \316H\f\317H\203\203\203\203\203\211\203\320\321&!\266\214\202\203\320 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 10 string-to-number format-time-string "%j" 17 3 2 1 4 5 6 float-time encode-time] 28 (#$ . 14916)]) #@70 compiler-macro for inlining `ts-day-name'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-day-name--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-day-name (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 9) (aset struct 9 (format-time-string "%A" (ts-unix struct)))) (aref struct 9)) nil] 9 (#$ . 15469)]) (put 'ts-day-name 'compiler-macro 'ts-day-name--cmacro) #@60 Access slot "day-name" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-day-name #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\211\211\305\306\307\301!>\204)\302\303\304D\"\210\310H\204\203\310\311H\312H\313H \314H\n\315H \316H\203}\203}\203}\203}\203}\211\203}\317\320&!\266\214\202\201\317 \266\214I\210\310H\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 9 format-time-string "%A" 17 3 2 1 4 5 6 float-time encode-time] 27 (#$ . 15914)]) #@70 compiler-macro for inlining `ts-day-abbr'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-day-abbr--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-day-abbr (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 8) (aset struct 8 (format-time-string "%a" (ts-unix struct)))) (aref struct 8)) nil] 9 (#$ . 16452)]) (put 'ts-day-abbr 'compiler-macro 'ts-day-abbr--cmacro) #@60 Access slot "day-abbr" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-day-abbr #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\211\211\305\306\307\301!>\204)\302\303\304D\"\210\310H\204\203\310\311H\312H\313H \314H\n\315H \316H\203}\203}\203}\203}\203}\211\203}\317\320&!\266\214\202\201\317 \266\214I\210\310H\"I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 8 format-time-string "%a" 17 3 2 1 4 5 6 float-time encode-time] 27 (#$ . 16897)]) #@65 compiler-macro for inlining `ts-dow'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-dow--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-dow (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 7) (aset struct 7 (string-to-number (format-time-string "%w" (ts-unix struct))))) (aref struct 7)) nil] 9 (#$ . 17435)]) (put 'ts-dow 'compiler-macro 'ts-dow--cmacro) #@55 Access slot "dow" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-dow #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\315H \316H\f\317H\203\203\203\203\203\211\203\320\321&!\266\214\202\203\320 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 7 string-to-number format-time-string "%w" 17 3 2 1 4 5 6 float-time encode-time] 28 (#$ . 17874)]) #@66 compiler-macro for inlining `ts-year'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-year--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-year (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 6) (aset struct 6 (string-to-number (format-time-string "%Y" (ts-unix struct))))) (aref struct 6)) nil] 9 (#$ . 18426)]) (put 'ts-year 'compiler-macro 'ts-year--cmacro) #@56 Access slot "year" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-year #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\315H \316H\f\305H\203\203\203\203\203\211\203\317\320&!\266\214\202\203\317 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 6 string-to-number format-time-string "%Y" 17 3 2 1 4 5 float-time encode-time] 28 (#$ . 18870)]) #@67 compiler-macro for inlining `ts-month'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-month--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-month (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 5) (aset struct 5 (string-to-number (format-time-string "%m" (ts-unix struct))))) (aref struct 5)) nil] 9 (#$ . 19422)]) (put 'ts-month 'compiler-macro 'ts-month--cmacro) #@57 Access slot "month" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-month #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\315H \305H\f\316H\203\203\203\203\203\211\203\317\320&!\266\214\202\203\317 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 5 string-to-number format-time-string "%m" 17 3 2 1 4 6 float-time encode-time] 28 (#$ . 19871)]) #@65 compiler-macro for inlining `ts-day'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-day--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-day (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 4) (aset struct 4 (string-to-number (format-time-string "%d" (ts-unix struct))))) (aref struct 4)) nil] 9 (#$ . 20425)]) (put 'ts-day 'compiler-macro 'ts-day--cmacro) #@55 Access slot "day" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-day #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \314H\n\305H \315H\f\316H\203\203\203\203\203\211\203\317\320&!\266\214\202\203\317 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 4 string-to-number format-time-string "%d" 17 3 2 1 5 6 float-time encode-time] 28 (#$ . 20864)]) #@68 compiler-macro for inlining `ts-second'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-second--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-second (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 3) (aset struct 3 (string-to-number (format-time-string "%S" (ts-unix struct))))) (aref struct 3)) nil] 9 (#$ . 21414)]) (put 'ts-second 'compiler-macro 'ts-second--cmacro) #@58 Access slot "second" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-second #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\305H\312H \313H\n\314H \315H\f\316H\203\203\203\203\203\211\203\317\320&!\266\214\202\203\317 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 3 string-to-number format-time-string "%S" 17 2 1 4 5 6 float-time encode-time] 28 (#$ . 21868)]) #@68 compiler-macro for inlining `ts-minute'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-minute--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-minute (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 2) (aset struct 2 (string-to-number (format-time-string "%M" (ts-unix struct))))) (aref struct 2)) nil] 9 (#$ . 22424)]) (put 'ts-minute 'compiler-macro 'ts-minute--cmacro) #@58 Access slot "minute" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-minute #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\305H \313H\n\314H \315H\f\316H\203\203\203\203\203\211\203\317\320&!\266\214\202\203\317 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 2 string-to-number format-time-string "%M" 17 3 1 4 5 6 float-time encode-time] 28 (#$ . 22878)]) #@66 compiler-macro for inlining `ts-hour'. (fn CL-WHOLE-ARG STRUCT) (defalias 'ts-hour--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (struct) (cl-block ts-hour (or (ts-p struct) (signal 'wrong-type-argument (list 'ts struct))) (unless (aref struct 1) (aset struct 1 (string-to-number (format-time-string "%H" (ts-unix struct))))) (aref struct 1)) nil] 9 (#$ . 23434)]) (put 'ts-hour 'compiler-macro 'ts-hour--cmacro) #@56 Access slot "hour" of `ts' struct STRUCT. (fn STRUCT) (defalias 'ts-hour #[257 "\301!>\204\302\303\304D\"\210\211\305H\204\214\211\305\306\307\310\301!>\204+\302\303\304D\"\210\311H\204\205\311\312H\313H \305H\n\314H \315H\f\316H\203\203\203\203\203\211\203\317\320&!\266\214\202\203\317 \266\214I\210\311H\"!I\210\211\305H\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 1 string-to-number format-time-string "%H" 17 3 2 4 5 6 float-time encode-time] 28 (#$ . 23878)]) (byte-code "\300\301\302\"\210\300\303\304\"\210\300\305\306\"\210\300\307\306\"\210\300\310\311\"\210\300\312\313\"\210\300\314\315\"\210\300\316\317\"\210\300\320\321\"\210\300\322\323\"\210\300\324\323\"\210\300\325\323\"\210\300\326\327\"\210\300\330\327\"\210\300\331\327\"\210\300\332\333\"\210\300\334\333\"\210\300\335\336\"\210\300\337\336\"\210\300\340\341\"\207" [defalias ts-B ts-month-name ts-b ts-month-abbr ts-week-of-year ts-woy ts-week ts-day-of-year ts-doy ts-day-of-week-name ts-day-name ts-day-of-week-abbr ts-day-abbr ts-day-of-week-num ts-dow ts-Y ts-year ts-m ts-month ts-moy ts-month-num ts-d ts-day ts-dom ts-day-of-month-num ts-S ts-second ts-sec ts-M ts-minute ts-min ts-H ts-hour] 3) #@119 Return `ts' struct set to now. This is a non-inlined function, so it may be rebound, e.g. with `cl-letf' for testing. (defalias 'ts-now #[0 "\300\301\302\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\303 &\207" [record ts nil float-time] 19 (#$ . 25143)]) #@235 Format timestamp with `format-time-string'. If TS-OR-FORMAT-STRING is a timestamp or nil, use the value of `ts-default-format'. If both TS-OR-FORMAT-STRING and TS are nil, use the current time. (fn &optional TS-OR-FORMAT-STRING TS) (defalias 'ts-format #[512 "\302!>\203x\303 \302!>\204\304\305\306D\"\210\307H\204s\307\310H\311H\312H\313H \314H\n\315H\203m\203m\203m\203m\203m\211\203m\316\317&!\266\214\202q\316 \266\214I\210\307H\"\207;\203\302!>\203\363\303\302!>\204\226\304\305\306D\"\210\307H\204\356\307\310H\311H\312H\313H\314H \315H\203\350\203\350\203\350\203\350\203\350\211\203\350\316\317&!\266\214\202\354\316 \266\214I\210\307H\"\207\211\204\373\303!\207\320\321\322#\205\232\323\207\204\221\302!>\203\303 \302!>\204\"\304\305\306D\"\210\307H\204z\307\310H\311H\312H\313H\314H \315H\203t\203t\203t\203t\203t\211\203t\316\317&!\266\214\202x\316 \266\214I\210\307H\"\207\211\204\207\303 !\207\320\321\324#\205\232\323\207\320\321\325#\205\232\323\207" [cl-struct-ts-tags ts-default-format type-of format-time-string signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time error "cl-etypecase failed: %s, %s" (ts null) nil (ts null) (ts string null)] 26 (#$ . 25421)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-format speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@79 Return new `ts' struct, parsing STRING with `parse-time-string'. (fn STRING) (defalias 'ts-parse #[257 "\300!\301\211\302X\203\2118\204\211\233\211\301\240\266\211T\262\202\210\303\304\305\306\307\"!\"\207" [parse-time-string 0 5 make-ts :unix float-time apply encode-time] 8 (#$ . 26929)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-parse speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@385 Return new `ts' struct, parsing STRING with `parse-time-string'. Empty hour/minute/second values are filled according to FILL: if `begin', with 0; if `end', hour is filled with 23 and minute/second with 59; if nil, an error may be signaled when time values are empty. Note that when FILL is `end', a time value like "12:12" is filled to "12:12:00", not "12:12:59". (fn FILL STRING) (defalias 'ts-parse-fill #[514 "\300!\301\267\202[\211@\204\211\211\302\240\266\211A@\204!\211A\211\302\240\266\3038\204f\211AA\211\302\240\266\202f\211@\204=\211\211\304\240\266\211A@\204J\211A\211\304\240\266\3038\204f\211AA\211\305\240\266\202f\203f\306\307\"\266\310\311\312\313\314\"!\"\207" [parse-time-string #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (begin 9 end 50)) 0 2 59 23 error "No clause matching `%S'" make-ts :unix float-time apply encode-time] 9 (#$ . 27374)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-parse-fill speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@123 Return TS with all slots cleared except `unix'. Non-destructive. The same as: (make-ts :unix (ts-unix ts)) (fn TS) (defalias 'ts-reset #[257 "\301\302\303!>\204\304\305\306D\"\210\307H\204i\307\310H\311H\312H\313H\314H \315H\203c\203c\203c\203c\203c\211\203c\316\317&!\266\214\202g\316 \266\214I\210\307H\"\207" [cl-struct-ts-tags make-ts :unix type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 28452)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-reset speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@157 Return timestamp TS after updating its Unix timestamp from its other slots. Non-destructive. To be used after setting slots with, e.g. `ts-fill'. (fn TS) (defalias 'ts-update #[257 "\300!\210\211\301H\302H\303H\304H\305H\306H\307\310\311\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\312\313&!&\207" [type-of 3 2 1 4 5 6 record ts nil float-time encode-time] 39 (#$ . 29089)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-update speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@204 Return timestamp object for Org timestamp element ELEMENT. Element should be like one parsed by `org-element', the first element of which is `timestamp'. Assumes timestamp is not a range. (fn ELEMENT) (defalias 'ts-parse-org-element #[257 "\211\211A@\300\301\"\300\302\"\300\303\"\300\304\"\300\305\"\306\307\206\310\206$\310\310  \311\211\211\211\211\211\211\211\211\211\211&\207" [plist-get :year-start :month-start :day-start :hour-start :minute-start record ts 0 nil] 27 (#$ . 29650)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-parse-org-element speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@192 Return timestamp object for Org timestamp string ORG-TS-STRING. Note that function `org-parse-time-string' is called, which should be loaded before calling this function. (fn ORG-TS-STRING) (defalias 'ts-parse-org #[257 "\300 \301\302\"\216\303!)\262\211\242\243\211\242\243\211\242\243\211\242\243\211\242\243\211\242\243 \n \304\305 \306\211\211\211\211\211\211\211\211\211\211&\207" [match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] org-parse-time-string record ts nil] 39 (#$ . 30310)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-parse-org speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@418 Return timestamp object for Org timestamp string ORG-TS-STRING. Note that function `org-parse-time-string' is called, which should be loaded before calling this function. Hour/minute/second values are filled according to FILL: if `begin', with 0; if `end', hour is filled with 23 and minute/second with 59. Note that `org-parse-time-string' does not support timestamps that contain seconds. (fn FILL ORG-TS-STRING) (defalias 'ts-parse-org-fill #[514 "\300\301\"\211\242\243\211\242\243\211\242\243\211\242\243\211\242\243\211\242\243 \n \302\267\202s\2046\303\262\204=\303\262\204w\303\262\202w\204[\204[\304\262\304\262\305\262\202w\204b\304\262\204i\304\262\204w\305\262\202w\306\307!\210\310\311 \312\211\211\211\211\211\211\211\211\211\211&\207" [org-parse-time-string nodefault #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (begin 47 end 71)) 0 59 23 error "FILL must be `begin' or `end'" record ts nil] 40 (#$ . 31009)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-parse-org-fill speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@283 Return new timestamp based on TS with new slot values. Fill timestamp slots, overwrite given slot values, and return new timestamp with Unix timestamp value derived from new slot values. SLOTS is a list of alternating key-value pairs like that passed to `make-ts'. (fn &rest ARGS) (defalias 'ts-apply #[128 "\301\302\"\301\303\"\301\304\"\301\305\"\301\306\"\301\307\"\310!\311!\262\203\273\312!>\2046\313\314\315D\"\210\211\316H\204\263\211\316\317\320\321\312!>\204R\313\314\315D\"\210\322H\204\254\322\316H\323H \324H\n\325H \326H\f\327H\203\246\203\246\203\246\203\246\203\246\211\203\246\330\331&!\266\214\202\252\330 \266\214I\210\322H\"!I\210\211\211\316 I\266\203S\312!>\204\316\313\314\315D\"\210\211\323H\204K\211\323\317\320\332\312!>\204\352\313\314\315D\"\210\322H\204D\322\316H\323H \324H\n\325H \326H\f\327H\203>\203>\203>\203>\203>\211\203>\330\331&!\266\214\202B\330 \266\214I\210\322H\"!I\210\211\211\323I\266\203\353\312!>\204f\313\314\315D\"\210\211\324H\204\343\211\324\317\320\333\312!>\204\202\313\314\315D\"\210\322H\204\334\322\316H\323H \324H\n\325H \326H\f\327H\203\326\203\326\203\326\203\326\203\326\211\203\326\330\331&!\266\214\202\332\330 \266\214I\210\322H\"!I\210\211\211\324I\266\203\203\312!>\204\376\313\314\315D\"\210\211\325H\204{\211\325\317\320\334\312!>\204\313\314\315D\"\210\322H\204t\322\316H\323H \324H\n\325H \326H\f\327H\203n\203n\203n\203n\203n\211\203n\330\331&!\266\214\202r\330 \266\214I\210\322H\"!I\210\211\211\325I\266\203\312!>\204\226\313\314\315D\"\210\211\326H\204\211\326\317\320\335\312!>\204\262\313\314\315D\"\210\322H\204\f\322\316H\323H \324H\n\325H \326H\f\327H\203\203\203\203\203\211\203\330\331&!\266\214\202\n\330 \266\214I\210\322H\"!I\210\211\211\326I\266\203\261\312!>\204-\313\314\315D\"\210\211\327H\204\252\211\327\317\320\336\312!>\204I\313\314\315D\"\210\322H\204\243\322\316H\323H \324H\n\325H \326H\f\327H\203\235\203\235\203\235\203\235\203\235\211\203\235\330\331&!\266\214\202\241\330 \266\214I\210\322H\"!I\210\211\211\327I\266\211\312!\210\211\316H\323H\324H\325H\326H\327H\337\315\340\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\330\331&!&\207" [cl-struct-ts-tags plist-get :second :minute :hour :day :month :year -last-item ts-fill type-of signal wrong-type-argument ts 3 string-to-number format-time-string "%S" 17 2 1 4 5 6 float-time encode-time "%M" "%H" "%d" "%m" "%Y" record nil] 47 (#$ . 32185)]) (set-advertised-calling-convention 'ts-apply '(&rest slots ts) nil) #@96 Define `ts-fill' function that fills all applicable slots of `ts' object from its `unix' slot. (defalias 'ts-define-fill '(macro . #[0 "\300\301\302\303\304\302\211\2032\211A\262\242\262\262T\262@\305>\204\306AA\307\"\203B\262\202\266\211\237\262\"\310\311\"\312\300\313\"!\300\314\"\315\316\"\302\302\304\302\211\211:\203\227@\262:\203\227@\262\317\320BB\262\321\322=\203}\323D\202~D!\244\262A\262A\262T\262\302\262\202S\237\266\210\324\325\326\327\330\331\332\333\334\n\335BB\336BBDDC\337\340\341 BBBE\257\207" [mapcar #[257 "\300\301\302@!P!AAD\207" [intern ":" symbol-name] 5 "\n\n(fn IT)"] nil ((cl-tag-slot) (hour nil :type integer :accessor-init (string-to-number (format-time-string "%H" (ts-unix struct))) :aliases (H) :constructor "%H") (minute nil :type integer :accessor-init (string-to-number (format-time-string "%M" (ts-unix struct))) :aliases (min M) :constructor "%M") (second nil :type integer :accessor-init (string-to-number (format-time-string "%S" (ts-unix struct))) :aliases (sec S) :constructor "%S") (day nil :type integer :accessor-init (string-to-number (format-time-string "%d" (ts-unix struct))) :aliases (day-of-month-num dom d) :constructor "%d") (month nil :type integer :accessor-init (string-to-number (format-time-string "%m" (ts-unix struct))) :aliases (month-num moy m) :constructor "%m") (year nil :type integer :accessor-init (string-to-number (format-time-string "%Y" (ts-unix struct))) :aliases (Y) :constructor "%Y") (dow nil :type integer :accessor-init (string-to-number (format-time-string "%w" (ts-unix struct))) :aliases (day-of-week-num) :constructor "%w") (day-abbr nil :accessor-init (format-time-string "%a" (ts-unix struct)) :aliases (day-of-week-abbr) :constructor "%a") (day-name nil :accessor-init (format-time-string "%A" (ts-unix struct)) :aliases (day-of-week-name) :constructor "%A") (doy nil :type integer :accessor-init (string-to-number (format-time-string "%j" (ts-unix struct))) :aliases (day-of-year) :constructor "%j") (woy nil :type integer :accessor-init (string-to-number (format-time-string "%V" (ts-unix struct))) :aliases (week week-of-year) :constructor "%V") (month-abbr nil :accessor-init (format-time-string "%b" (ts-unix struct)) :aliases (b) :constructor "%b") (month-name nil :accessor-init (format-time-string "%B" (ts-unix struct)) :aliases (B) :constructor "%B") (tz-abbr nil :accessor-init (format-time-string "%Z" (ts-unix struct)) :constructor "%Z") (tz-offset nil :accessor-init (format-time-string "%z" (ts-unix struct)) :constructor "%z") (internal nil :accessor-init (apply #'encode-time (decode-time (ts-unix struct)))) (unix nil :accessor-init (pcase-let* (((cl-struct ts second minute hour day month year) struct)) (if (and second minute hour day month year) (float-time (encode-time second minute hour day month year)) (float-time))))) 0 (unix internal cl-tag-slot) plist-get :constructor -map car -non-nil #[257 "\300A@\301\"\207" [plist-get :constructor] 4 "\n\n(fn IT)"] #[257 "\300A@\301\"\207" [plist-get :type] 4 "\n\n(fn IT)"] s-join "\f" nth (time-values) reverse integer string-to-number defun ts-fill (ts) "Return TS having filled all slots from its Unix timestamp.\nThis is non-destructive." let time-values save-match-data split-string format-time-string ((ts-unix ts)) ("\f") make-ts :unix (ts-unix ts)] 17 (#$ . 35065)])) #@94 Return TS having filled all slots from its Unix timestamp. This is non-destructive. (fn TS) (defalias 'ts-fill #[257 "\301 \302\303\"\216\304\305\306\307!>\204\310\311\312D\"\210\313H\204t\313\314H\315H\316H \317H\n\320H \321H\203n\203n\203n\203n\203n\211\203n\322\323&!\266\214\202r\322 \266\214I\210\313H\"\324\")\262\325\326\307!>\204\217\310\311\312D\"\210\313H\204\350\313\314H\315H\316H\317H \320H\n\321H\203\342\203\342\203\342\203\342\203\342\211\203\342\322\323&!\266\214\202\346\322 \266\214I\210\313H\327\330@!\331\330A@!\332\330\315\n8!\333\330\314\f8!\334\330\3178!\335\330\3208!\336\330\3218!\337\3408\341\3428\343\330\3448!\345\330\3468!\347\3508\351\3528\353\3548\355\356!8& \207" [cl-struct-ts-tags match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] split-string format-time-string "%H\f%M\f%S\f%d\f%m\f%Y\f%w\f%a\f%A\f%j\f%V\f%b\f%B\f%Z\f%z" type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time "\f" make-ts :unix :hour string-to-number :minute :second :day :month :year :dow :day-abbr 7 :day-name 8 :doy 9 :woy 10 :month-abbr 11 :month-name 12 :tz-abbr 13 :tz-offset 14] 36 (#$ . 38466)]) #@68 Return difference in seconds between timestamps A and B. (fn A B) (defalias 'ts-difference #[514 "\301!>\204\302\303\304D\"\210\305H\204f\305\306H\307H\310H\311H\312H\313H\203`\203`\203`\203`\203`\211\203`\314\315&!\266\214\202d\314 \266\214I\210\305H\301!>\204x\302\303\304D\"\210\305H\204\317\305\306H\307H\310H\311H\312H\313H\203\311\203\311\203\311\203\311\203\311\211\203\311\314\315&!\266\214\202\315\314 \266\214I\210\305HZ\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 39762)]) (defalias 'ts-diff 'ts-difference) #@200 Return plist describing duration SECONDS. List includes years, days, hours, minutes, and seconds. This is a simple calculation that does not account for leap years, leap seconds, etc. (fn SECONDS) (defalias 'ts-human-duration #[257 "\300!\211\301\245\301\246\262\302\245\302\246\262\303\245\303\246\262\304\245\304\246\262\305\306\307\310\311 \257\n\207" [floor 31536000 86400 3600 60 :years :days :hours :minutes :seconds] 16 (#$ . 40452)]) #@250 Return human-formatted string describing duration SECONDS. If ABBREVIATE is non-nil, return a shorter version, without spaces. This is a simple calculation that does not account for leap years, leap seconds, etc. (fn SECONDS &optional ABBREVIATE) (defalias 'ts-human-format-duration #[513 "\300!\301\302\"\301\303\"\301\304\"\301\305\"\301\306\"\307\203!\310\202\"\311\312\313V\205C\314\315 \f\2037\310\2028\316 \203A\317\202B\320$\313V\205c\314\315  \203W\310\202X\316\203a\321\202b\322$\313V\205\203\314\315 \203w\310\202x\316\203\201\323\202\202\324$\313V\205\243\314\315 \203\227\310\202\230\316\203\241\325\202\242\326$\313V\205\303\314\315 \203\267\310\202\270\316\203\301\327\202\302\330$\257!\"\207" [ts-human-duration plist-get :years :days :hours :minutes :seconds s-join "" ", " -non-nil 0 format "%d%s%s" " " "y" "years" "d" "days" "h" "hours" "m" "minutes" "s" "seconds"] 20 (#$ . 40922)]) #@374 Return new timestamp having applied ADJUSTMENTS to TS. ADJUSTMENTS should be a series of alternating SLOTS and VALUES by which to adjust them. For example, this form returns a new timestamp that is 47 hours into the future: (ts-adjust 'hour -1 'day +2 (ts-now)) Since the timestamp argument is last, it's suitable for use in a threading macro. (fn &rest ADJUSTMENTS) (defalias 'ts-adjust #[128 "\301!\302!\303!\304\211\211:\203I\262\211A\262\242\262\211@\262\305!>\2041\306\307\310D\"\210\311\310\"H\\I\266AA\262\202 \266\211\305!\210\211\312H\313H\314H\315H\316H\317H\320\310\304\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\321\322&!&\207" [cl-struct-ts-tags -last-item nbutlast ts-fill nil type-of signal wrong-type-argument ts cl-struct-slot-offset 3 2 1 4 5 6 record float-time encode-time] 43 (#$ . 41902)]) (set-advertised-calling-convention 'ts-adjust '(&rest adjustments ts) nil) #@151 Return a new timestamp based on TS with its SLOT incremented by VALUE. SLOT should be specified as a plain symbol, not a keyword. (fn SLOT VALUE TS) (defalias 'ts-inc #[771 "\301!\262\302!>\204\303\304\305D\"\210\211\306\305\"H\\I\266\211\302!\210\211\307H\310H\311H\312H\313H\314H\315\305\316\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\317\320&!&\207" [cl-struct-ts-tags ts-fill type-of signal wrong-type-argument ts cl-struct-slot-offset 3 2 1 4 5 6 record nil float-time encode-time] 42 (#$ . 42875)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-inc speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@151 Return a new timestamp based on TS with its SLOT decremented by VALUE. SLOT should be specified as a plain symbol, not a keyword. (fn SLOT VALUE TS) (defalias 'ts-dec #[771 "\301!\262\302!>\204\303\304\305D\"\210\211\306\305\"HZI\266\211\302!\210\211\307H\310H\311H\312H\313H\314H\315\305\316\211\211\211\211\211\211\211\211\211\211\211\211\211\211\211\317\320&!&\207" [cl-struct-ts-tags ts-fill type-of signal wrong-type-argument ts cl-struct-slot-offset 3 2 1 4 5 6 record nil float-time encode-time] 42 (#$ . 43578)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-dec speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@356 Return timestamp TS having applied ADJUSTMENTS. This function is destructive, as it calls `setf' on TS. ADJUSTMENTS should be a series of alternating SLOTS and VALUES by which to adjust them. For example, this form adjusts a timestamp to 47 hours into the future: (let ((ts (ts-now))) (ts-adjustf ts 'hour -1 'day +2)) (fn TS &rest ADJUSTMENTS) (defalias 'ts-adjustf '(macro . #[385 "\300\301\302DE\303\304\211\211\211\211\211:\203I\262\211A\262\242\262@\262\305\306\307A@!P!\262\310 DEB\262AA\262\304\262\202\237\266\207\301\311DEC\"BB\207" [progn setf ts-fill append nil intern "ts-" symbol-name cl-incf ts-update] 16 (#$ . 44280)])) #@143 Increment timestamp PLACE by VALUE (default 1), update its Unix timestamp, and return the new value of PLACE. (fn PLACE &optional (VALUE 1)) (defalias 'ts-incf '(macro . #[385 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\305\306A@\307A@DE\310\311E\306A@\312 A@DEEE\207" [1 signal wrong-number-of-arguments ts-incf 2 progn setf ts-fill prog1 cl-incf ts-update] 11 (#$ . 44967)])) #@143 Decrement timestamp PLACE by VALUE (default 1), update its Unix timestamp, and return the new value of PLACE. (fn PLACE &optional (VALUE 1)) (defalias 'ts-decf '(macro . #[385 "\211\203 \211A\262\242\202\300\203\301\302\303\304G\\D\"\210\305\306A@\307A@DE\310\311E\306A@\312 A@DEEE\207" [1 signal wrong-number-of-arguments ts-decf 2 progn setf ts-fill prog1 cl-decf ts-update] 11 (#$ . 45389)])) #@116 Return non-nil if TS is within range BEG to END, inclusive. All arguments should be `ts' structs. (fn BEG END TS) (defalias 'ts-in #[771 "\300\"\205 \300\"\207" [ts<=] 6 (#$ . 45811)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ts-in speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@292 Return non-nil if timestamp A is the same as timestamp B. Compares only the timestamps' `unix' slots. Note that a timestamp's Unix slot is a float and may differ by less than one second, causing them to be unequal even if all of the formatted parts of the timestamp are the same. (fn A B) (defalias 'ts= #[514 "\301!>\204\302\303\304D\"\210\305H\204f\305\306H\307H\310H\311H\312H\313H\203`\203`\203`\203`\203`\211\203`\314\315&!\266\214\202d\314 \266\214I\210\305H\301!>\204x\302\303\304D\"\210\305H\204\317\305\306H\307H\310H\311H\312H\313H\203\311\203\311\203\311\203\311\203\311\211\203\311\314\315&!\266\214\202\315\314 \266\214I\210\305HU\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 46140)]) #@67 Return non-nil if timestamp A is less than timestamp B. (fn A B) (defalias 'ts< #[514 "\301!>\204\302\303\304D\"\210\305H\204f\305\306H\307H\310H\311H\312H\313H\203`\203`\203`\203`\203`\211\203`\314\315&!\266\214\202d\314 \266\214I\210\305H\301!>\204x\302\303\304D\"\210\305H\204\317\305\306H\307H\310H\311H\312H\313H\203\311\203\311\203\311\203\311\203\311\211\203\311\314\315&!\266\214\202\315\314 \266\214I\210\305HW\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 47008)]) #@60 Return non-nil if timestamp A is <= timestamp B. (fn A B) (defalias 'ts<= #[514 "\301!>\204\302\303\304D\"\210\305H\204f\305\306H\307H\310H\311H\312H\313H\203`\203`\203`\203`\203`\211\203`\314\315&!\266\214\202d\314 \266\214I\210\305H\301!>\204x\302\303\304D\"\210\305H\204\317\305\306H\307H\310H\311H\312H\313H\203\311\203\311\203\311\203\311\203\311\211\203\311\314\315&!\266\214\202\315\314 \266\214I\210\305HX\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 47651)]) #@70 Return non-nil if timestamp A is greater than timestamp B. (fn A B) (defalias 'ts> #[514 "\301!>\204\302\303\304D\"\210\305H\204f\305\306H\307H\310H\311H\312H\313H\203`\203`\203`\203`\203`\211\203`\314\315&!\266\214\202d\314 \266\214I\210\305H\301!>\204x\302\303\304D\"\210\305H\204\317\305\306H\307H\310H\311H\312H\313H\203\311\203\311\203\311\203\311\203\311\211\203\311\314\315&!\266\214\202\315\314 \266\214I\210\305HV\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 48288)]) #@60 Return non-nil if timestamp A is >= timestamp B. (fn A B) (defalias 'ts>= #[514 "\301!>\204\302\303\304D\"\210\305H\204f\305\306H\307H\310H\311H\312H\313H\203`\203`\203`\203`\203`\211\203`\314\315&!\266\214\202d\314 \266\214I\210\305H\301!>\204x\302\303\304D\"\210\305H\204\317\305\306H\307H\310H\311H\312H\313H\203\311\203\311\203\311\203\311\203\311\211\203\311\314\315&!\266\214\202\315\314 \266\214I\210\305HY\207" [cl-struct-ts-tags type-of signal wrong-type-argument ts 17 3 2 1 4 5 6 float-time encode-time] 25 (#$ . 48934)]) (provide 'ts)