~ubuntu-branches/ubuntu/vivid/mricron/vivid

« back to all changes in this revision

Viewing changes to dcm2nii/dicomtypes.pas

  • Committer: Package Import Robot
  • Author(s): Michael Hanke
  • Date: 2012-05-15 08:59:27 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120515085927-l0zoatiwial8v8o1
Tags: 0.20120505.1~dfsg.1-1
* New upstream code (Closes: #671365).
* Update upstream source URL.
* Bumped Standards-version to 3.9.3, no changes necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
function SecSinceMidnight(H,Min,S: integer): integer;
320
320
//86,400 sec per day
321
321
begin
322
 
        result := 3600*(H-1) + 60* Min + S;//H-1 as our clock runs from 1..24 not 0..23
 
322
  //
 
323
        result := 3600*(H) + 60* Min + S;//H not H-1 as our clock runs from  0..23  not 1..24
323
324
end;
324
325
 
325
326
function BogusDateTime: TDateTime;
329
330
 
330
331
function EncodeDateTime (Y,M,D,H,Min,S: integer): TDateTime;
331
332
begin
 
333
 
332
334
  try
333
335
         result := EncodeDate(Y,M,D) + (SecSinceMidnight(H,Min,S) / 86400);
334
336
  except  //impossible date - set to cold fusion date
350
352
     Secs := round(Frac(lDateTime)*86400);
351
353
     S := secs mod 60;
352
354
     Min := (secs div 60) mod 60;
353
 
     H := (secs div 3600)+1;
 
355
     H := (secs div 3600);
354
356
end;
355
357
 
356
358
function StudyDateTime2Str (lDateTime: TDateTime):string;