Calculate with negative times
Lex Spoon
lex at cc.gatech.edu
Thu Mar 14 23:27:35 UTC 2002
Markus Fritsche <Fritsche.Markus at gmx.net> wrote:
> I need this for my "working time" calculator. Like
> Begin: 8:00
> Time to work: 7:31
> Pause: 0:30
> "Gleitzeit" -5:00
> End: 16:00
>
ANSI Smalltalk has DateAndTime and it has Duration, which fit the
problem very naturally. You can subtract two DateAndTime's to get a
duration, and you can add a bunch of durations together to get their
sum.
So, one option is to dig up the ANSI extensions for Squeak and use them.
-Lex
More information about the Squeak-dev
mailing list
|