In response to Bale's comment here (albeit a year late), I created this library of moon/date-related functions.
Basically, some things to note:
Comments, questions, suggestions? (Or horrifying bugs?)
5/31 (circa 2 p.m. Pacific time): Bugfix.
7/30: Huh, just realized that DateLib didn't even need the absolute value function. Uploaded "fixed" version (although this is just the removal of one line of code)
Basically, some things to note:
- A variable with the date record can be created with dateform(int).
- Most functions have been overloaded, so that this is not strictly necessary.
- Dates supplied for dateform() must be formatted like today_to_string() (that is, YYYYMMDD)
- datediff() finds the number of days between two dates.
- moon_phase(date) returns the moon phase on a given date. The 0-parameter form of this function already exists.
- Similarly, moon_light(date) returns the total moon brightness on a given date. The 0-parameter form of this function already exists.
- grimacite_darkness(date) is a new one, though. It returns the darkness, as used by Grimacite gear.
Comments, questions, suggestions? (Or horrifying bugs?)
5/31 (circa 2 p.m. Pacific time): Bugfix.
7/30: Huh, just realized that DateLib didn't even need the absolute value function. Uploaded "fixed" version (although this is just the removal of one line of code)
Attachments
Last edited: