Temlakos пишет: > > Anniversaries certainly /would/ be of interest. That would require a > query process that could take the numerical value, resolve it into > day, month, and year, and then search for a month and a day. It would > /also/ require a specification of which calendar the anniversary is in. > The specification of calendar should be a part of the query. But, unfortunately, it's not too simple to perform anniversary searches efficiently with linear storage of dates. There must be additional numerical fields stored in DB for every date, each type of calendar.
I was originally thinking of storing just day,month, year for every numerical date. This easily allows to choose anniversaries of month, events of day, events of year. Unfortunately, it's not handy when someone needs a list of anniversaries of the week, or just a list of "5 nearest anniversaries to day", regardless of next month/ year "wrapping". Wrapping (carrying overflow) is the main problem with such non-linear numerical systems. So, I've come to decision that "ordinal date of the year" is a better value. Anyway the year itself is almost always a "base" of anniversary. I calculate it with my semantic template, which uses Template:Orddate from http://meta.wikimedia.org, to store it as separate semantic property. Also the value of the year. Unfortunately, resulting #asks are nested and thus aren't very efficient. Also, ordinal date of the year is different for days after february, 28th, so I have to store two ordinal dates - one for a leap year; and another one for non-leap year. This probably is true for most of other calendars :-( I should wait for SMW1.4 - maybe there's a chance that anniversaries will be implemented. Otherwise, after 1.4 release I might try to make a patch myself, however I am not the best coder out there. Multiple calendars are espcially a challenge. We'll see.. Gregorian support for the start is a must. It would be easier to extend it later.. > For example: My birthday is November 24, 1957 in the Gregorian > calendar. (I believe you still use the Julian calendar, and so it > would be November 12.) Julian calendar is used by Russian Orthodox Church, so it may be useful to wikis dedicated to the history of Orthodox Church. Officially we use the same Gregorian calendar as the West. My queries are all Gregorian, for example. > In the /Hillel II/ calendar, it was 1 Kislev 5718. And in the Biblical > AM calendar (based on Floyd N. Jones' /Chronology of the Old > Testament/ and other commentaries on the calendar of the ancient > Israelites), it is 2 Kislev 5961 AM. As you can readily see, I could > celebrate my birthday on three different days in any given year, > depending on what type of anniversary I preferred. For example, if I > decided to observe the Hillel II anniversary this year, then I would > celebrate my birthday on November 28, not November 24. > Well, being a Russian (we have "Old New Year", "Orthodox Christmas" and "New Year", "Western Christmas" celebrations), where "old" is Julian and "new" is Gregorian, it's nothing unusual to me :-) > So you see, the calendar determines the anniversary. Why, I know for a > fact that some of my Jewish acquaintances mark births (and even > deaths) according to the Hillel II calendar, not the Gregorian. > > All this is quite a challenge. I realize that. Of course, that's why I > have shared my code with the developer in charge of the official SMW > date datatype. (If anyone else needs to see it, let me know and I'll > send it in a separate e-mail. The Developer's List e-mail address > cannot accept an attachment of that size.) > > Temlakos > It would be nice if you can send the PHP date conversion code for multiple calendars to my email address. Also, why not to distribute it via http link, so anyone who needs the extension may download it? Dmitriy ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
