Skip to content

Implementation of operation (TimeOnly - TimeOnly) #60056

Discussion options

You must be logged in to vote

If you want return a TimeSpan (interval between time), then result may be negative. Because if (A < B), then (A - B)<0

In the ISO world (and in reality), there is no such thing as a negative duration. (Although I personally agree with you here, that it does make some operations easier). This was debated at design time, and changing it now would be a massive breaking change.

If you want return a TIME (as you are say in comment "Gives the elapsed time between two points"), then result must be TimeOnly.

"Time" has multiple uses in English - the phrase "time me", for instance, is asking for a duration, not the wall-clock time. Hence why it's "elapsed time" in the method documentation.

Re…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dmitry-lipetsk
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants