BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Work time + breaks

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal
View previous topic :: View next topic  
Author Message
koobelek@hotmail.com
Guest





PostPosted: Wed Jul 13, 2005 7:55 pm    Post subject: Work time + breaks Reply with quote



I have the start time and the stop time (I will refer to it later as
the work time), two 15 minutes breaks and one lunch break (30 min). I
know how to calculate the difference between two times. I'm wondering
though, how to check if the breaks have occurred within the work time.
Moreover, the number of the 15 min. breaks may vary. I would appreciate
any suggestions.

Example:

CsNumOfBreaks = 10; // const

tmBreaks : array[1..csNumOfBreaks,1..2] of TDateTime; //not sure about
this declaration, but let's assume that it is correct

edStartTime.Text := '8:50 AM';
edStopTime.Text := '3:45 PM'; // total work time: 415 min (6.92
hrs)
tmBreaks[1,1] := '9:00 AM'; // break start
tmBreaks[1,2] := '9:15 AM'; //break stop
tmBreaks[2,1] := '11:30 AM'; // lunch start
tmBreaks[2,2] := '12:00 PM'; // lunch stop
tmBreaks[3,1] := '2:00 AM'; // break start
tmBreaks[3,2] := '2:15 AM'; //break stop
// total break time: 60 min

// check if all the breaks within the work time?
// worktime = 415
// breaktime = 60
// totalworktime = worktime - breaktime (355 min/5.92 hrs)

Regards,
Kooobel

Back to top
Riki Wiki
Guest





PostPosted: Thu Jul 14, 2005 5:30 am    Post subject: Re: Work time + breaks Reply with quote



Quote:
I would appreciate any suggestions.

Hoi Koobelek

Take a look here:
http://delphi.wikicities.com/wiki/Delphi_Newsgroups

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ObjectPascal All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.