![]() |
|
|
#4
|
||||
|
||||
|
А ведь можно ещё прям из maskedit время брать, текстом, а дальше чистое LMD:
Код:
function changeMinStr(s: string; ds: integer): string; var i, b, c: integer; hr, mn: string; begin i:= (StrToInt(s[1]+s[2])*60)+StrToInt(s[4]+s[5])+ds; b:= i div 60; if b > 23 then b:= b mod 24; c:= i mod 60; if b < 10 then hr:= '0' + IntToStr(b) else hr:= IntToStr(b); if c < 10 then mn:= '0' + IntToStr(c) else mn:= IntToStr(c); Result:= hr + ':' + mn; end; |