Markus:

Thank you for your generous feedback on my Historical Date datatype.

If you know what sort of site I administer, then you know that my
estimate for the beginning of the universe is a time that is a little
over 500 years more recent than the theoretical start of the Julian
Period. (Specifically, I maintain that time -4159-10-27T15:28:00
(ISO8601) is the moment of creation.) In fact, I invite you to visit our
German site,

<http://creationwiki.org/de/>

Remember, however, that I base my new date type on the Julian Day, as a
64-bit float. The upper limit of absolute value for such a variable is
about 10^308. That many days represents about 3 * 10^305 years. I think
the Julian Day ought to be suitable for any set of assumptions.

The key to user-value parsing (and also XSD value parsing beyond the
typical XSD value range) is the use of regular expressions (regex), and
in particular the strategic placement of parentheses in the regex
pattern. The function preg_match in PHP will capture expressions that
are in parentheses for whatever reason. Once I realized that, and also
realized that captured expressions were assigned to a match array with
consistent keys, I could easily define parsing patterns that reliably
capture day and year figures and month names.

Lately I added support for what our research indicates was the likely
pre-exilic Hebrew calendar. In the process I discovered that your Date
type does not implement tooltip displays. I have implemented tooltip
displays in my current version of the type. To do that, I adapted the
getShortWikiText function from your Geographic coordinates datatype. I
also refined the printvalue function so that it will return only a
/preferred/ calendar string--with the preference derived from the user
value.

The latest version of the file is attached. With it you can see all the
things I've done so far.

Again, most of the conversion algorithms I used come from:

<http://www.fourmilab.ch/documents/calendar>

John Walker, the author and master of that site, has released all his
algorithms (in Javascript form) to the public domain. All I have done,
in the case of the Gregorian and Julian calendars, is translate his
Javascript to PHP, while substituting class methods and properties for
global functions and local or global function variables. His site even
has a link for downloading all of the files that drive his calendar
converter, as a .ZIP archive.

Walker's support for the French Republican calendar will amaze you: he
uses astronomical algorithms to predict the equinox at the Paris
meridian to determine when a French Republican leap year would actually
be observed. He does not have an algorithm for my ancient Hebrew
calendar (labeled "AM" for "Anno Mundi"), so I wrote that on my own--and
I release that, too.

I plan to implement the modern Hebrew calendar next, and will support
other calendars as the needs of our site require them.

Thank you also, in closing, for the links to the Simile project. I will
see whether I can gain any insight there on how to use the new datatype
to create historical timelines.

Best regards,

Terry A. Hurlbut (User:Temlakos)
Sysop
<http://creationwiki.org/>
<http://creationwiki.org/de/>

Attachment: SMW_DV_HxDate.php
Description: application/php

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to