Re: Date Formats
- From: Murray Cumming <murrayc murrayc com>
- To: Phill Gillespie <it snipef org>
- Cc: glom-devel-list gnome org
- Subject: Re: Date Formats
- Date: Wed, 15 Mar 2006 10:47:50 +0100
On Tue, 2006-03-14 at 17:16 +0000, Phill Gillespie wrote:
How do you change the formats of the dates within glom?
Glom tries to just use the "correct" format for your locale. Specifying
a particular format should be unnecessary and it would just be
irritating to people using the same file in a different locale (This is
a common annoyance when exchanging Excel or FileMaker files.)
I've added a
new date field and it takes the date I enter (in my British locale) as
dd/mm/yyyy and it strips of the final two year digits and prefixes it
with 19, e.g. 13/01/1977 becomes 1913-01-19.
Is this what you see in Postgres or what you see in Glom?
Does it make any difference when you use 01 instead of 1 (at least, or
exactly, 2 digits for each part)?
PostgreSQL has the type
correctly listed as date.
I think that's more a case of completely wrong date parsing. We don't
need a "make it work" option. It should just work. Please file a bug
with exact details, and I'll try it with a British locale some time.
GlomConversions::parse_date() is the code that does this, by the way.
Additionally there only seems space to display two digits for the year,
regardless of where it appears in the string!
Yes, that annoys me too. I'd like to enforce 4-digit display and entry
of years. Unfortunately I don't see a way to tell C++ or C to just
"format the date appropriately for the locale, with 4 digits for the
year." std::time_put<char>::put(), with a format of 'x', uses 2 digits.
GlomConversions::format_date() does this, by the way.
Sounds like a separate bug that should be opened. We'll fix it, even if
it's difficult.
In the screenshots in the
wiki there your date of birth looks as I would expect but on my system
it's quite messed up :-(
Thanks for the feedback.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]