all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Format modifier suggestion for format-time-string
@ 2010-11-21  4:48 MON KEY
  2010-11-21 17:47 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: MON KEY @ 2010-11-21  4:48 UTC (permalink / raw)
  To: emacs-devel; +Cc: larsi, hober0

> I'm guessing this will be for Emacs 24, though.

This was topic was addressed circa August 2009 prior to release of Emacs 23 with
apparently too little time to integrate a similarly proposed feature.

See "Re: Can `format-time-string' produce full/extended ISO 8601 times?"
http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00262.html

Now its too little to late for 24?

Maybe we can expect this feature for Emacs 26...

--
/s_P\



^ permalink raw reply	[flat|nested] 6+ messages in thread
* Format modifier suggestion for format-time-string
@ 2010-11-19 19:23 Edward O'Connor
  2010-11-19 19:30 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Edward O'Connor @ 2010-11-19 19:23 UTC (permalink / raw)
  To: emacs-devel; +Cc: www-archive

Hi.

When generating data formats that rely on RFC 3339 date and time formats
(Atom, say) in elisp, I've often found myself having to do something
like this:

(defun rfc3339-datetime (&optional time)
  (let ((stamp (format-time-string "%Y-%m-%dT%H:%M:%S%z" time)))
    (format "%s:%s" (substring stamp 0 -2) (substring stamp -2))))

In RFC 3339, the colon separating hours and minutes within a time zone
offset is mandatory, but `format-time-string' doesn't have the ability
to generate time zone offsets with a colon in them.

I'd like to suggest the addition of a : modifier, such that
(format-time-string "%:z") would generate an RFC 3339-compatible time
zone offset.

What do you think?


Thanks for the consideration,
Ted



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-21 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21  4:48 Format modifier suggestion for format-time-string MON KEY
2010-11-21 17:47 ` Eli Zaretskii
2010-11-21 20:18   ` MON KEY
  -- strict thread matches above, loose matches on Subject: below --
2010-11-19 19:23 Edward O'Connor
2010-11-19 19:30 ` Lars Magne Ingebrigtsen
2010-11-19 19:36   ` Edward O'Connor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.