
On Mon, 27 Feb 2006 10:41:40 -0500, Caleb Epstein wrote
On 2/26/06, Jeff Garland <jeff@crystalclearsoftware.com> wrote:
//struct to represent elements of a point in time struct timepoint { year_type year; //32 bit unsigned integer -- range depends on calendar week_type month; //short integer 1-12 -- zero flags invalid short day_of_year; //short short day_of_week; //0-6 -- 0 == sunday short week_number; //1-53 - 0 indicates invalid short hours; //0-24 short minutes; //0-59 short seconds; //0-60 -- 60 is leap second frac_seconds_type fractional_seconds_count; short frac_seconds_resolution; //increments of 10 only };
So would "pow(10, frac_seconds_resolution )-1" be the maximum expected value of fractional_seconds_count
Right.
(excepting perhaps leap- microseconds or something)?
That won't be supported -- fortunately it isn't needed :)
I think this could bear a little further explanation than just "increments of 10 only". Given that it is a short I assume its not the denominator itself, but the log10 of it.
Well there's a good possibility that the concept isn't thought thru all the way since things aren't implemented this way currrently ;-) The original idea is that a 0 would indicate no fractional seconds, 10 would indicate a resolution of tenths of seonds, 100 hundreths of seconds, etc -- for which a short doesn't work. But I like your idea better -- perhaps fact_seconds_digits is clearer. BTW, (not so subtle request comming) I haven't received much detailed feedback on the proposal so I'd love someone with a critical eye to read and send me feedback ;-) Jeff