erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-discuss] Re: Date format in messages


From: Adrian Aichner
Subject: [Erc-discuss] Re: Date format in messages
Date: Tue, 01 Aug 2006 22:17:34 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b27 (windows-nt)

Andreas Schwab <address@hidden> writes:

> Currently erc-backend uses a mix of different formats to display the date
> in various messages.  IMHO it should always use the unambigous %Y-%m-%d
> format.

Hi Andreas, All, would it make sense to move even closer to ISO8601,
by changing the format to "%Y-%m-%d %T" or even "%Y-%m-%dT%T"?

I use the latter in my customixed erc-format-timestamp defun.

Adrian

>
> Andreas.
>
> 2006-08-01  Andreas Schwab  <address@hidden>
>
>       * erc-backend.el (TOPIC, 317, 329, 333): Use %Y-%m-%d for
>       formatting the date.
>
> --- orig/erc-backend.el
> +++ mod/erc-backend.el
> @@ -1287,7 +1287,7 @@
>    nil nil
>    (let* ((ch (first (erc-response.command-args parsed)))
>           (topic (erc-trim-string (erc-response.contents parsed)))
> -         (time (format-time-string "%T %m/%d/%y" (current-time))))
> +         (time (format-time-string "%T %Y-%m-%d" (current-time))))
>      (multiple-value-bind (nick login host)
>          (erc-parse-user (erc-response.sender parsed))
>        (erc-update-channel-member ch nick nick nil nil nil host login)
> @@ -1457,7 +1457,7 @@
>    (multiple-value-bind (nick seconds-idle on-since time)
>        (cdr (erc-response.command-args parsed))
>      (setq time (when on-since
> -                 (format-time-string "%T %Y/%m/%d"
> +                 (format-time-string "%T %Y-%m-%d"
>                                       (erc-string-to-emacs-time on-since))))
>      (erc-update-user-nick nick nick nil nil nil
>                            (and time (format "on since %s" time)))
> @@ -1515,7 +1515,7 @@
>                 (third (erc-response.command-args parsed)))))
>      (erc-display-message
>       parsed 'notice (erc-get-buffer channel proc)
> -     's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time))))
> +     's329 ?c channel ?t (format-time-string "%A %Y-%m-%d %X" time))))
>  
>  (define-erc-response-handler (330)
>    nil nil
> @@ -1554,7 +1554,7 @@
>    nil nil
>    (multiple-value-bind (channel nick time)
>        (cdr (erc-response.command-args parsed))
> -    (setq time (format-time-string "%T %Y/%m/%d"
> +    (setq time (format-time-string "%T %Y-%m-%d"
>                                     (erc-string-to-emacs-time time)))
>      (erc-update-channel-topic channel
>                                (format "\C-o (%s, %s)" nick time)

-- 
Adrian Aichner
 mailto:address@hidden
 http://www.xemacs.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]