Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: I Should've Been Asleep Two Hours Ago...

From:Iain E. Davis <feaelin@...>
Date:Saturday, April 24, 2004, 22:23
> From: David Peterson [mailto:ThatBlueCat@AOL.COM]
> What would be even cooler is if someone who was math savvy > could figure out how to manipulate the code so that it could > be applied to different calendrical (?) systems. So, for
...different calendar systems... (I believe that's the way it would be said.)
> example, I thought that the concept of a week in Kamakawi > should be 14 days instead of seven. The way the code is > written now, I could only do seven days, but there should be > a way to manipulate it so you could get 14. But even that > should be easier than, say, a system where each week was > composed of four days, or maybe each year was composed of > five weeks. If there's anybody who knows how to do this kind > of thing, I'd love to see it done.
The first step down such a road is deciding how the calendar system matches up (or doesn't, in many cases) a traditional calendar system. Calendar systems that supposed to be for a world similar to ours are the easiest (since they typically are a new arrangement of the 365-day year). Identify the point where you can find a common event on both calendars, and then work out the logic with a little math..for example the Falhaval used a 365-day calendar, which begins roughly around the same time as our March 1st. So the first week on their calendar would be our Mar 1st to Mar 6th, the 2nd week is 7 to 12th. I'd probably find it easiest to query the clock for the "number of the day of the year" e.g., the number that will range from 001-366, and then calculate from there which day, week, and month it is.* It becomes more tricky when working with a calendar that doesn't match up precisely annually, then you have to pick an arbitrary point on our calendar, and muck about with some tedious math dealing with working it out from the "seconds since epoch" value that most machines rely on. Often that value is the number of seconds since 1970-Jan-01, but not always. :). I always considered using my birth date for this, but never got around to actually writing any code to do it. :) * Although you'd have some nasty special cases dealing with 'did earth have a leap year this year, and how does that skew our math?'

Reply

Mark J. Reed <markjreed@...>