[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: a human-eye date format everyone can love

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-25 04:23:08 CEST

On Mon, Jun 24, 2002 at 06:25:22PM -0500, Kirby C. Bohling wrote:
>...
> My suggestion isn't terribly different then the current one, except that
> instead of using "()", use the field delimiter for the current output
> stream. Rather then try and pick for everyone on the plant what goes in
> the the ()'s just let them specify it thru some controlled manner.

Actually... this is quite nice. Imagine something like this:

  std = strftime(standard_fmt, time_data)

  extra_fmt = config.get("options", "time_fmt")
  if not extra_fmt:
    return std

  extra = strftime(extra_fmt, time_data)
  return apr_pstrcat(pool, std, " ", extra, NULL)

Then a person could do something like:

  [options]
  # append (Wednesday) to my output dates
  time_fmt = (%A)

Another alternative:

  # append [Wed, 26 Jun 2002]
  time_fmt = [%a, %m %b %Y]

The next question is what to default for time_fmt if it isn't present in the
configuration file. :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 25 04:20:57 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.