PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: cCalendar RC 3  (Read 668 times)

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
cCalendar RC 3
« on: October 02, 2016, 01:24:00 PM »

This release is in the form of FF project. You'll have to save the attached FF project and compile it. The cCalendar class is embedded in the startup, so there is no reference to a include to worry about. Everything in the previous test scripts is included. The Anchorage, Alaska airport is, by default, the location of reference. You can change it to your location and update the daylight savings rules to get local results.

This is almost complete. I still have the Hindu Lunar date calculations to figure out. The demo program includes a "placeholder" waiting for that to be ready and then it's a version 1.0 release. As future changes are incorporated, I'll repost and update the attachment to keep the space used down.

All known errata have been corrected. If you find one, please reply here and I'll get it addressed.

Enjoy!
« Last Edit: January 08, 2017, 04:57:58 PM by Richard Kelly »
Logged

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: cCalendar RC 3
« Reply #1 on: October 03, 2016, 08:24:11 PM »

I spent too many hours on the lunar illumination to get it corrected. I used the algo from Jean Meeus/Astronomical Algorithms, Chapter 48. Sometimes it was right and sometimes it was wrong. Until I figure out what is going on, I've removed it from cCalendar.

The lunar phases routine was returning phases outside the local time range and that has been corrected.

Additionally, I added some code to set the calendar control to the last date selected when it's opens.

Attachment updated.
Logged

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: cCalendar RC 3
« Reply #2 on: January 08, 2017, 05:02:38 PM »

A bug in the calculation of business dates was found. When adding or subtracting business days from a date an endless loop was possible if the calculation involved a date outside of the known limits of the provided non business date rules.

Calculation loop changed to detect this and only apply weekday rules. The demo project was also updated to calculate USA federal holidays (the only ones used in the demo) to include the previous and next years.

Attachment updated.
Logged