[Typo3-dev] Dates in non-UNIX format
Martin T. Kutschker
Martin.no5pam.Kutschker at blackbox.n0spam.net
Wed Nov 24 13:24:28 CET 2004
David Bruehlmeier wrote:
> Hi list,
>
> in October, I had posted an RFC to collect requirements for a new data
> format to store dates in a non-UNIX format.
> (http://typo3.org/documentation/mailing-lists/dev-list-archive/thread/67703/
> ). In the meantime, I collected your posts from the WIKI and today, I sent
> the final version of the requirements to Kasper.
I remeber this.
But I also recall that I didn't see a point in a discussion, if
requirement 3 already defines the storage type. What else is left to
discuss.
I myself would have chosen Julian dates. They have a reasonable range
and are integers (=> easy sorting).
As for ISO and sorting with b.c. dates: They'll be sorted wrongly
anyway, because the sort order of the year would have to change in the
middle of the query.
But if you use ISO notation, eg:
-2000
-1000
+1000
+2000
You can achieve this:
SELECT 0+(left(d,5)) as year FROM t ORDER BY year
But I don't know how protable the forced casting to int is.
And it only gets the years correct. The days within the years will still
be in the wrong order.
Seems much overhead for a little used feature. I vote for dropping
support of b.c. dates or intriduction of two types:
* simple type (a.c.)
* complete type (b.c. and a.c.)
Masi
More information about the TYPO3-dev
mailing list