Calendar Conversion Program?

Substantial postings about constructed languages and constructed worlds in general. Good place to mention your own or evaluate someone else's. Put quick questions in C&C Quickies instead.
Post Reply
User avatar
Zaarin
Smeric
Smeric
Posts: 1136
Joined: Sun Aug 15, 2010 5:00 pm

Calendar Conversion Program?

Post by Zaarin »

Math isn't my best subject, and my conworld has different day, month, and year lengths from Earth's. I'm finding I'm having trouble accurately converting ages and dates. Anyone know if there's some kind of program that can work this sort of thing out?
"But if of ships I now should sing, what ship would come to me,
What ship would bear me ever back across so wide a Sea?”

Ziz
Avisaru
Avisaru
Posts: 274
Joined: Sat Jul 08, 2006 10:05 pm
Location: Tel Aviv, Israel

Re: Calendar Conversion Program?

Post by Ziz »

Just define all the increments of time on your concalendar in terms of Earth time. Then pick a Julian day that corresponds to the first day of some year on your calendar. Then just take the number of days on your calendar that have elapsed since that concordance date, convert them to Earth days, then add that number to the Julian date you picked at the start. You can then use a tool like this to turn that number into an Earth date.

Example:
- Say each of your conworld days = 27 Earth hours
- Your concalendar is 300 days long, divided into 12 months of 25 days
- You pick Jan 11, 2015 as the first day of your con-Year 1 (= JD 2457033.5)
- You want to convert the con-date 22/08/398 to an Earth date

398 conyears * 300 condays = 119,400 condays + (8 conmonths * 25 condays) = 119,600 condays + 22 condays = 119,622 condays since concordance date

119,622 condays * 27 hours / 24 hours = 134,574.75 Earth days

JD 2457033.5 + 134574.75 = JD 2591608.25

Plug that into the converter linked above, and you figure out that condate 22/08/398 corresponds to Earth date 25 June 2383.

~~

None of the calculations are really that difficult. You can make things faster by preconverting certain increments (1 day, 1 month, 1 year, etc.) of contime to Earth days. Of course, I picked pretty numbers, and if your calendar has irregular month or year lengths, it'll be slightly more difficult.
Last edited by Ziz on Sun Jan 11, 2015 6:35 pm, edited 1 time in total.

User avatar
Zaarin
Smeric
Smeric
Posts: 1136
Joined: Sun Aug 15, 2010 5:00 pm

Re: Calendar Conversion Program?

Post by Zaarin »

Ziz wrote:Just define all the increments of time on your concalendar in terms of Earth time. Then pick a Julian day that corresponds to the first day of some year on your calendar. Then just take the number of days on your calendar that have elapsed since that concordance date, convert them to Earth days, then add that number to the Julian date you picked at the start. You can then use a tool like this to turn that number into an Earth date.

Example:
- Say each of your conworld days = 27 Earth hours
- Your concalendar is 300 days long, divided into 12 months of 25 days
- You pick Jan 11, 2015 as the first day of your con-Year 1 (= JD 2457033.5)
- You want to convert the con-date 22/08/398 to an Earth date

398 conyears * 300 condays = 119,400 condays + (8 conmonths * 25 condays) = 119,600 condays + 22 condays = 119,622 condays since concordance date

(119,622 condays/27 Earth hours) = (x Earth days/24 earth hours); x = 106330.67 Earth days

JD 2457033.5 + 106330.67 = JD 2563364.17

Plug that into the converter linked above, and you figure out that condate 22/08/398 corresponds to Earth date February 25, 2306.

~~

None of the calculations are really that difficult. You can make things faster by preconverting certain increments (1 day, 1 month, 1 year, etc.) of contime to Earth days. Of course, I picked pretty numbers, and if your calendar has irregular month or year lengths, it'll be slightly more difficult.
Hmm, that could work. Thanks.
"But if of ships I now should sing, what ship would come to me,
What ship would bear me ever back across so wide a Sea?”

Ziz
Avisaru
Avisaru
Posts: 274
Joined: Sat Jul 08, 2006 10:05 pm
Location: Tel Aviv, Israel

Re: Calendar Conversion Program?

Post by Ziz »

Of course, I'm not very good at math either, which is why I screwed up the proportion, now that I'm looking at it again.

119,622 condays * 27 hours / 24 hours = 134,574.75 Earth days

So the actual date would be, JD 2591608.25 = 25 June 2383.

Whoops. I knew it didn't make sense that Earth days would be fewer than condays, since condays are longer. Guess that's what happens when you do things hastily at work. #embarrassing

User avatar
finlay
Sumerul
Sumerul
Posts: 3600
Joined: Mon Dec 22, 2003 12:35 pm
Location: Tokyo

Re: Calendar Conversion Program?

Post by finlay »

I did it with excel a couple of times, basically incrementing the number of days since x, rather than using Julian days, but close enough. It does indeed get more and more complicated when you add in rules for such things as leap years.

User avatar
alynnidalar
Avisaru
Avisaru
Posts: 491
Joined: Fri Aug 15, 2014 9:35 pm
Location: Michigan, USA

Re: Calendar Conversion Program?

Post by alynnidalar »

I wrote a Javascript converter for personal use ages ago--you put in the length of the planet's day in Earth-seconds, then the number of days in the planet's year, and you can then convert between Earth day/years and the planet's day/years. It's pretty barebones, but if you think it'd help you, let me know and I'll send you the code.
I generally forget to say, so if it's relevant and I don't mention it--I'm from Southern Michigan and speak Inland North American English. Yes, I have the Northern Cities Vowel Shift; no, I don't have the cot-caught merger; and it is called pop.

User avatar
Zaarin
Smeric
Smeric
Posts: 1136
Joined: Sun Aug 15, 2010 5:00 pm

Re: Calendar Conversion Program?

Post by Zaarin »

finlay wrote:I did it with excel a couple of times, basically incrementing the number of days since x, rather than using Julian days, but close enough. It does indeed get more and more complicated when you add in rules for such things as leap years.
Yeah, a major complication with my calendar is that it's lunar solar--a month gets added every 7 years and subtracted every 42. :/
alynnidalar wrote:I wrote a Javascript converter for personal use ages ago--you put in the length of the planet's day in Earth-seconds, then the number of days in the planet's year, and you can then convert between Earth day/years and the planet's day/years. It's pretty barebones, but if you think it'd help you, let me know and I'll send you the code.
Couldn't hurt to take a look at it. :)
"But if of ships I now should sing, what ship would come to me,
What ship would bear me ever back across so wide a Sea?”

User avatar
finlay
Sumerul
Sumerul
Posts: 3600
Joined: Mon Dec 22, 2003 12:35 pm
Location: Tokyo

Re: Calendar Conversion Program?

Post by finlay »

I think mine has exactly the same rule. I can't remember, though. Mine is complex because it has to work out the system for two moons at once.

User avatar
Haloed Bane
Sanci
Sanci
Posts: 32
Joined: Thu Nov 27, 2014 9:16 pm
Location: USA
Contact:

Re: Calendar Conversion Program?

Post by Haloed Bane »

I looked long and hard for something that would help me convert to my conworld's calendar. I basically ended up doing what Ziz mentioned, using Julian Dates. I wrote a Python program to convert Julian Dates to my calendar dates (I suck at programming, but the thing worked). Still, it was a grind because in order to figure out the Julian Date I had to use an online converter first. Eventually, I bit the bullet and managed to modify an existing JD converter and merge it with a Javascript version of my original program, so that a single program would do both parts of the process for me in one go. (I even managed to create a Javascript to do the conversion in reverse, but it only works in a script test page and not on the website for some reason).

The time durations in my conplanet are different from Earth's, BUT there are no leap years at all, which means that once I've pinned down the exact Julian Date for the calendar's starting point, everything else is relatively easy (in retrospect). A couple of issues that will come up with Western calendar to conworld conversions are 1) the Julian vs Gregorian reckoning, proleptic etc. and 2) Year 0 in the Western calendar (traditionally there isn't one, but astronomers usually add a year 0, so you have to factor that in with most converters out there).

User avatar
Zaarin
Smeric
Smeric
Posts: 1136
Joined: Sun Aug 15, 2010 5:00 pm

Re: Calendar Conversion Program?

Post by Zaarin »

Haloed Bane wrote:I looked long and hard for something that would help me convert to my conworld's calendar. I basically ended up doing what Ziz mentioned, using Julian Dates. I wrote a Python program to convert Julian Dates to my calendar dates (I suck at programming, but the thing worked). Still, it was a grind because in order to figure out the Julian Date I had to use an online converter first. Eventually, I bit the bullet and managed to modify an existing JD converter and merge it with a Javascript version of my original program, so that a single program would do both parts of the process for me in one go. (I even managed to create a Javascript to do the conversion in reverse, but it only works in a script test page and not on the website for some reason).

The time durations in my conplanet are different from Earth's, BUT there are no leap years at all, which means that once I've pinned down the exact Julian Date for the calendar's starting point, everything else is relatively easy (in retrospect). A couple of issues that will come up with Western calendar to conworld conversions are 1) the Julian vs Gregorian reckoning, proleptic etc. and 2) Year 0 in the Western calendar (traditionally there isn't one, but astronomers usually add a year 0, so you have to factor that in with most converters out there).
Yeah, I've fiddled around with Ziz's program, but my leap-years and leap-leap-years are a problem. I think I'm going to pick a starting date and just plot out the two calendars side by side--'cause what's a thousand years' worth of calendars? :P Or I may scrap my crazy lunisolar calendar and pick either a lunar or solar calendar that doesn't involve adding and dropping months in seven/forty-two year intervals...
"But if of ships I now should sing, what ship would come to me,
What ship would bear me ever back across so wide a Sea?”

User avatar
Haloed Bane
Sanci
Sanci
Posts: 32
Joined: Thu Nov 27, 2014 9:16 pm
Location: USA
Contact:

Re: Calendar Conversion Program?

Post by Haloed Bane »

Yup, 1000 years is a long time, but plotting it out by hand might still be doable (especially if your conworld's days are exactly the same length as Earth days). I was dealing with about 9000 years so it was just too much. I was really tempted to use leap years to keep up with the seasons, but my conworld is supposed to be pretty darned advanced technologically and the calendar in place began in the space age, so I reckon by that point the main use of a calendar is purely record-keeping (they can produce really nifty almanacs for anyone interested in knowing exactly when spring begins etc, just like we have today). That's my excuse for avoiding leap years :)

User avatar
Zaarin
Smeric
Smeric
Posts: 1136
Joined: Sun Aug 15, 2010 5:00 pm

Re: Calendar Conversion Program?

Post by Zaarin »

Haloed Bane wrote:Yup, 1000 years is a long time, but plotting it out by hand might still be doable (especially if your conworld's days are exactly the same length as Earth days). I was dealing with about 9000 years so it was just too much. I was really tempted to use leap years to keep up with the seasons, but my conworld is supposed to be pretty darned advanced technologically and the calendar in place began in the space age, so I reckon by that point the main use of a calendar is purely record-keeping (they can produce really nifty almanacs for anyone interested in knowing exactly when spring begins etc, just like we have today). That's my excuse for avoiding leap years :)
Yeah, my people are late bronze age so they kind of need their calendar to know when to plant and harvest. Unfortunately my planet's day is 25 hours, but I could probably adjust for that.
"But if of ships I now should sing, what ship would come to me,
What ship would bear me ever back across so wide a Sea?”

Post Reply