BigMac:
i is not much of a problem since the lowest value it can get is -1
I use i when we are month jan and feb they are counted as month 13 and 14 of the year before
like you said you can use cY to put it in
Im using one of the formula in wiki
the lowest one they are more easy to me since we use the actual year instead of K and J
http://upload.wikimedia.org/math/d/b/7/db7eff99d21c5d7a2949c5fe68e6b771.png
each "part" of the formula is set into interger to remove
Your formala seem good (and much compressed)
im just a little incertain about
cX = (cDay + (cM + 1)*26/10 + K + K/4 + J/4 - 2*J) % 7;
Im not sure how cw will do it, will it add each floating poit one after the other if so you might get an error at the end
Lundin:
the long int casting remain from when stime.cyear was still a regular int
I can remove them now 
But the original problem was really
with the debugger when I was cheking
cY = (cX + (sTime.cYear-i));
cX = cY + 2;
cY didn t change at all...
both defined as int
but as long int it work so ill leave it like this 
where cX at first was something low like 500... 16-bit is up to 65536 (/2 if signed)
Thanks