I just finished debugging ��a production server that had a��similar��issue.��Basically��I need to select from a collection all events that were opening in the next 24 hours. I have code like :-
Comment #5 on issue 3806 by cesar.ra...@gmail.com: Duration>>hours is broken While I can second Sebastians' complains based in intuitivity, I got confused with the redaction of the ANSI standard, which I have only a 1.9 Draft in PDF form:
5.8.2.11 Message: hours
Synopsis
Answer the number of complete hours in the receiver.
Definition: <Duration>
Answer an <integer> between -23 and 23 inclusive that represents the number of complete hours
in the receiver, after the number of complete days has been removed. If the receiver is less than
<Duration factory> #zero then the result will be less than or equal to 0.
Return Values
<integer> unspecified
Errors
None
This text seems to support the implementation of the method which is attempting to give the number of fractional part of the duration. It does not seem to be a conversion protocol, but rather an equivalent to the mod operation for hours, or seconds or whatever.
Test this:
(DateAndTime now - DateAndTime today) hours.
In my image, at the time I tested it gave a correct "16".