Function: srecode-semantic-handle-:time

srecode-semantic-handle-:time is a byte-compiled function defined in args.el.gz.

Signature

(srecode-semantic-handle-:time DICT)

Documentation

Add macros into the dictionary DICT based on the current :time.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/args.el.gz
;;; :time ARGUMENT HANDLING
;;
;; When a :time argument is required, fill the dictionary with
;; information about the current Emacs time.
(defun srecode-semantic-handle-:time (dict)
  "Add macros into the dictionary DICT based on the current :time."
  ;; DATE Values
  (let ((now (current-time)))
    (srecode-dictionary-set-value
     dict "YEAR" (format-time-string "%Y" now))
    (srecode-dictionary-set-value
     dict "MONTHNAME" (format-time-string "%B" now))
    (srecode-dictionary-set-value
     dict "MONTH" (format-time-string "%m" now))
    (srecode-dictionary-set-value
     dict "DAY" (format-time-string "%d" now))
    (srecode-dictionary-set-value
     dict "WEEKDAY" (format-time-string "%a" now))
    ;; Time Values
    (srecode-dictionary-set-value
     dict "HOUR" (format-time-string "%H" now))
    (srecode-dictionary-set-value
     dict "HOUR12" (format-time-string "%l" now))
    (srecode-dictionary-set-value
     dict "AMPM" (format-time-string "%p" now))
    (srecode-dictionary-set-value
     dict "MINUTE" (format-time-string "%M" now))
    (srecode-dictionary-set-value
     dict "SECOND" (format-time-string "%S" now))
    (srecode-dictionary-set-value
     dict "TIMEZONE" (format-time-string "%Z" now))
    ;; Convenience pre-packed date/time
    (srecode-dictionary-set-value
     dict "DATE" (format-time-string "%D" now))
    (srecode-dictionary-set-value
     dict "TIME" (format-time-string "%X" now))))