Changeset 660 for trunk/Common/Form
- Timestamp:
- May 31, 2014, 12:08:52 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Types/TimeDiff.php
r659 r660 7 7 function OnView($Item) 8 8 { 9 $Output = sprintf('%02d', floor($Item['Value'] / 3600 % 24)).':'. 10 sprintf('%02d', floor($Item['Value'] / 60 % 60)).':'. 11 sprintf('%02d', floor($Item['Value'] % 60)); 12 $Days = floor($Item['Value'] / (60 * 60 * 24)); 13 if($Days > 0) $Output = $Days.' dnů '.$Output; 9 if($Item['Value'] == null) $Output = ''; 10 else { 11 $Output = sprintf('%02d', floor($Item['Value'] / 3600 % 24)).':'. 12 sprintf('%02d', floor($Item['Value'] / 60 % 60)).':'. 13 sprintf('%02d', floor($Item['Value'] % 60)); 14 $Days = floor($Item['Value'] / (60 * 60 * 24)); 15 if($Days > 0) $Output = $Days.' dnů '.$Output; 16 } 14 17 return($Output); 15 18 }
Note:
See TracChangeset
for help on using the changeset viewer.