[Chugalug] Calculating the next Thanksgivukkah

Robert A. Kelly III bluethegrappler at gmail.com
Wed Oct 16 17:12:38 UTC 2013


On 10/09/2013 01:55 AM, Chad Smith wrote:
> 79043?
> 
> That's crazy.  It's also a prime number.  So, that's weird.

Hmm, that is interesting.

> On Tue, Oct 8, 2013 at 10:37 PM, Robert A. Kelly III
> <bluethegrappler at gmail.com <mailto:bluethegrappler at gmail.com>> wrote:
<snip>
>     A further examination shows that YR_RANGE is based on the assumption of
>     a 32-bit signed integer:
> 
>     /*---------------------------------------------------------------------*/
>     /* YR_RANGE: The range of years allowed.  With 32-bit signed
>     integers, */
>     /* the DATETIME type can store 2^31 minutes or about 4074 years.    
>       */
>     /*---------------------------------------------------------------------*/
>     #define YR_RANGE 4000
> 
>     With a 64-bit signed integer, it should be safe to use:
> 
>     #define YR_RANGE 17536635926176

The author, David Skoll, suggests that other parts of the code, such as
the Hebrew calendar and the sun and moon calculations might fail before
YR_RANGE overflows on a 64-bit machine.

>     Incidentally, I also noticed that the location for calculating things
>     like sunrise and sunset is hardcoded with the assumption of Ottawa,
>     Ontario, Canada. I guess remind really was intended to be compiled by
>     the user, LOL. It truly is, there is actually a GUI that lets you set
>     your latitude and longitude when you compile it. YR_RANGE, however, is
>     not intended to be altered so easily. The compile script should probably
>     automatically check for a 64-bit architecture and adjust accordingly.

I was mistaken, these are only defaults. You can set them at run-time with:

SET $LatDeg latitude_degrees
SET $LatMin latitude_seconds
SET $LongDeg longitude_degrees_west_is_positive
SET $LongMin longitude_minutes_west_is_positive
SET $Location "Name_Of_Location"



More information about the Chugalug mailing list