Comment 84 for bug 365065

Revision history for this message
In , Jralls (jralls) wrote :

GDate would be an acceptable impemlentation choice. GnuCash already uses them in several places, especially in calendar controls.

Your implementation would also need intervals, comparisons, and conversion to/from time64 and GDate. Quarters (13 weeks) are another commonly used period in accounting. An integer representation like GDate's julian day would be convenient for passing around. Leap years are easy: is_leap = y % 4 == 0 && !(y % 100 == 0 && y % 400 != 0). Localized string I/O would be the major complication.