emacs-devel
[Top][All Lists]
Advanced

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

RE: regexp to match formatted time string?


From: Drew Adams
Subject: RE: regexp to match formatted time string?
Date: Fri, 1 Feb 2008 16:07:25 -0800

> > Anyone have a function that takes, as its argument, a string that is
> > acceptable as input to `format-time-string' (i.e. a value like
> > `display-time-format'), and returns a regexp that will 
> > match all such formatted times, that is, whatever
> > `format-time-string' would return for the same input,
> > for any time?
> 
> It does sound kind of useful, but wouldn't it be rather hard 
> for some of the formats format-time-string supports -- e.g.,
> %c, %a, or %b?
> 
> Maybe that doesn't matter for the typical uses of such a function...
> (formats embedded in a file being font-locked would tend to be more
> portable ones, perhaps)

Good point.

I would be interested even if such a function were limited wrt the formats
it supported - some well-defined subset of what `format-time-string'
accepts.

The alternative, as I see it, is code that supports only one or a few
hard-coded time formats.





reply via email to

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