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

Re: date parsing on "bite-sized tasks" list

From: Alan Shutko <ats_at_acm.org>
Date: 2001-08-20 21:12:23 CEST

"C. Scott Ananian" <cananian@lesser-magoo.lcs.mit.edu> writes:

> I was just mentioning that there are POSIX functions (actually, I guess
> XOPEN standard in this case) which use *locale* to determine *input*
> format and so that idea that locale was output-only was misguided.

Well, strptime is a SUS function which uses locale to determine the
input format, if you use something like %x. However, I can't find any
way to query the locale information to do that on your own. Also,
locale was designed with output in mind, and clearly lacks flexibility
on input.

(It's interesting that you can get everything you need to print
numbers from the locale system, but not dates.)

Unless you can point out how I can burrow through locales to find a
locale that does things the way I want, or tell me how I can change
the definition of my current locale, I don't think that it's a very
good way to do it. And I still don't like the fact that you can't set
the locale for display differently than the locale for input.

If there were a way to query the locale to see if
[0-9][0-9][/-][0-9][0-9] was day-first or month-first, I'd be for it.
I cannot find such a way.

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
Mistakes are often the stepping stones to utter failure.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:36 2006

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.