home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / guile / 1.8 / lang / elisp / internals / time.scm < prev    next >
Encoding:
Text File  |  2008-12-17  |  406 b   |  15 lines

  1. (define-module (lang elisp internals time)
  2.   #:use-module (ice-9 optargs)
  3.   #:export (format-time-string))
  4.  
  5. (define* (format-time-string format-string #:optional time universal)
  6.   (strftime format-string
  7.         ((if universal gmtime localtime)
  8.          (if time
  9.          (+ (ash (car time) 16)
  10.             (let ((time-cdr (cdr time)))
  11.               (if (pair? time-cdr)
  12.               (car time-cdr)
  13.               time-cdr)))
  14.          (current-time)))))
  15.