Issue
TimeOfDay
documentation has no comparison operator and primitive comparison does not work. My only solution that I can thinking of right now is to convert TimeOfDay
to DateTime
and use DateTime
's difference method.
Does anyone have a better solution?
Solution
Convert it to a double then compare.
double toDouble(TimeOfDay myTime) => myTime.hour + myTime.minute/60.0
Answered By - Lucas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.