From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: regexp to match formatted time string? Date: Fri, 1 Feb 2008 16:07:25 -0800 Message-ID: <008f01c8652f$9778e510$864a908d@us.oracle.com> References: <008e01c86521$ef2366e0$864a908d@us.oracle.com> <87ejbwkzvk.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201911312 6573 80.91.229.12 (2 Feb 2008 00:15:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Feb 2008 00:15:12 +0000 (UTC) Cc: 'Emacs-Devel' To: "'Miles Bader'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 02 01:15:33 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JL62e-0005p0-RR for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2008 01:15:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL62D-0007Ld-4G for ged-emacs-devel@m.gmane.org; Fri, 01 Feb 2008 19:15:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JL628-0007K3-C4 for emacs-devel@gnu.org; Fri, 01 Feb 2008 19:15:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JL625-0007HN-Ng for emacs-devel@gnu.org; Fri, 01 Feb 2008 19:14:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL625-0007HI-L7 for emacs-devel@gnu.org; Fri, 01 Feb 2008 19:14:57 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JL621-0003BZ-Uy; Fri, 01 Feb 2008 19:14:54 -0500 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m1208pRU016651; Fri, 1 Feb 2008 18:08:51 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m11B0mJJ016899; Fri, 1 Feb 2008 17:08:50 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3551405621201910834; Fri, 01 Feb 2008 16:07:14 -0800 Original-Received: from dradamslap1 (/141.144.74.134) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 01 Feb 2008 16:07:14 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87ejbwkzvk.fsf@catnip.gol.com> Thread-Index: AchlLGNcvdcgm6ohQJGqEARCMUhEugAAhMRQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87967 Archived-At: > > 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.