PDA

View Full Version : Another calendar question



Shiiome
March 10th, 2020, 19:11
I've been crawling through the forums and I have my in game calendar displaying all the correct month and day names, and I have my leap year calculating properly. However, I'm having difficulty getting the correct day of the week for the beginning of the month. There's usually a gap of one or two days or an overlap of one or two days on my months. For clarity, I have 7 days per week and 12 months. The months have the following day numbers: 32, 29, 30, 31, 30, 29, 33, 29, 30, 31, 30, 31 with leap year adding one day on the sixth month. I feel like I'm pretty close to figuring this out but something just isn't clicking with me. Any help or pointers would be greatly appreciated, I've spent the last few hours dissecting example .mod and .ext files.

damned
March 10th, 2020, 23:19
Hi Shiiome

Have a look at some of Andraaxs samples. You will need to write some code to handle the missing piece.

Shiiome
March 11th, 2020, 01:46
Got it working but had to pull out the leap year. I'm not that concerned with astronomical accuracy so that's good enough. Thanks for the reply.

Andraax
March 11th, 2020, 02:18
You need one function to define the leap years, and another function to define the day of week for any combination of year, month, and day.

Shiiome
March 13th, 2020, 16:35
Yeah. Something in the leap year extension was causing my day calculator to not work properly as years advanced. It works fine when I don't call the leap year function so I'm satisfied. Thanks for the advice.

Andraax
March 13th, 2020, 16:52
If you send me the module and extension, I may be able to fix it for you.

Shiiome
March 15th, 2020, 04:26
Thanks for the offer, you guys are awesome. I've moved on to working on other details of my campaign at this point and am satisfied with what I have. I'm using the moon tracker crated by DMFirmy and maintained by you, btw. Fantastic tool. Thanks again for the offer, but at this point it's not needed.