Pantalimon:
Awesome name! Sounds very catchy, I like it very much. Palmspell.
AstareGod:
Cool, If it’s not to long you could just post it here. I’m using C because I can use freeware software tools. But it’s easy enough to convert it.
This is what I’m using at the moment. Hopefully it’ll get shorter.
//Finds the kin for 1904 + day
UInt16 GetKin(UInt32 day)
{
UInt16 k;
k = (day + 212 + LeapYears(day)) % 260; //Kin for today
return k;
}
//Returns the number of leapyears between 1904 and day/
//day is the number of days since 1904.
UInt16 LeapYears(UInt32 day)
{
UInt32 l, a, b, c;
a = (int)(((double)day - 59.0) / (YEAR_LEN * 4.0)); //Adds a leap year for every 4 years
b = (int)(((double)day + 1401.0) / (YEAR_LEN * 100.0)); //Subtracts a leap year for every 100 years
c = (int)(((double)day + 110974.0) / (YEAR_LEN * 400.0)); //Adds a leap year for every 400 years
l = a - b + c + 1;
return l;
}