Daniel Friesen wrote:
> I'm working on a DateTime library, AnyDateTime 
> <http://svn.nadir-point.com/viewvc/php-projects/trunk/AnyDateTime/>. The 
> plan is to have a library that can cover nearly any possible time or 
> date in history. The AnyDateTime library has a storage format which uses 
> 22 characters, and sorts correctly in the database.

Interesting!  Are you going to convert between different calendars?  IMO 
it's a complete waste, ISO8601 is the one true format.  But everyone 
implements the edge cases like years > 9999 and year "0" differently, 
see notes at http://www.w3.org/TR/xmlschema-2/#dateTime

> ????????????0501?????? would be understood as May 1st. 
Or are you going to make people enter dates in your nifty format? You 
could make it somewhat user-friendly just by putting the same dividers 
that ISO8601 uses, thus
   ????????????-05-01T??:??:??
It only adds 5 characters...

> The range of possible dates this library can cover is from
> 99,999,999,999 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.

Another way to handle dates far back in the past is to use Mya (million 
years ago, which is just a conversion for the custom unit Type:Time. 
See e.g. http://sandbox.semantic-mediawiki.org/wiki/Property:Geologic_time

I assume you're not bothering with timezone support and I wonder if it 
can work with Simile:Timeline.

You could still claim your datatype isNumeric, converting to a slightly 
inaccurate float just for SMW's collation.  On the other hand, if you 
stick with string, SMW's "LIKE" comparator for strings would let you 
query for
   [[event::~????????????0501*]]
to find "everything happening on May 1st" whether it's got a year and 
time or not.

> Hmm, rather than an overcomplicated output setup, I'm probably going
> to create a small format for outputting. One that works with Gregorian
> and Julian bases. Otherwise I'll overload with possible formats of outputs.

A while back you could control Type:Date in query results and with 
[[Property:display_units]] to specify a "custom unit" that was really a 
strftime() formatting string, thus
   |?Date of birth#%b %d=Birthday
in a query would display "Sep 3".  It was cool, it's broken now, but I 
incoherently think an explicit Property:Has_display_format that each 
datatype interprets is the way to go.

How will you export as RDF?  A while back a datatype could not export as 
xsd:dateTime in some situations and then as xsd:string in others.

> Quite simply, the idea is to be able to make use of it in Semantic 
> MediaWiki as an alternative date format. That way it's available for 
> anyone covering historical dates and such.

Denny wrote:
> There's also a student of ours working on something close to it,
> although I am not totally informed about the status. Since I don't know
> if Fabian is on this list, I'll CC him.

I think it would still be useful for someone to extend Type:Date to 
support dates beyond the range of the PHP timestamp (and support 
timezone, and use the user's Date & time format preference, ...).  I 
think the thing to do in Date:Time is detect when you're at the edge of 
the range and then do some simple timestamp= (YYYY + (12 * (MM + 31 * 
(DD + 24 * (HH + 60 * (MM + 60 * SS) to turn it into a large number. 
Again, only bother doing this for ISO8601 dates.

Good luck y'all, and despise me because I know more details than I can 
code.  Damn armchair commenters :-)

"Tonight I'm going to party like it's 1999-12-31T23:59:59 !" -- The 
Artist Formerly Known as Prince.
--
=S Page

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to