mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix duration
This commit is contained in:
parent
e51e32ab7e
commit
eae4dbd3c3
|
|
@ -219,7 +219,8 @@ function convertTime2Seconds($iHours = 0, $iMinutes = 0, $iSeconds = 0)
|
|||
* Can be used to show a duration.
|
||||
*
|
||||
* @param int $iSecond Number of seconds
|
||||
* @param string $format Output format ('all': total delay days hour:min like "2 days 12:30",
|
||||
* @param string $format Output format
|
||||
* - 'all': total delay days hour:min like "2 days 12:30",
|
||||
* - 'allwithouthour': total delay days without hour part like "2 days",
|
||||
* - 'allhourmin': total delay with format hours:min like "60:30",
|
||||
* - 'allhourminsec': total delay with format hours:min:sec like "60:30:10",
|
||||
|
|
|
|||
|
|
@ -649,8 +649,8 @@ if ($num > 0) {
|
|||
// Duration
|
||||
print '<td class="center" title="'.dol_escape_htmltag($datefromto).'">';
|
||||
if (!empty($datelastresult) && ($datelastresult >= $datelastrun)) {
|
||||
print convertSecondToTime(max($datelastresult - $datelastrun, 1), 'all');
|
||||
//print '<br>'.($datelastresult - $datelastrun).' '.$langs->trans("seconds");
|
||||
$nbseconds = max($datelastresult - $datelastrun, 1);
|
||||
print $nbseconds.' '.($nbseconds > 1 ? $langs->trans("SecondShort") : $langs->trans("SecondShort"));
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ MonthOfDay=Month of the day
|
|||
DaysOfWeek=Days of week
|
||||
HourShort=H
|
||||
MinuteShort=mn
|
||||
SecondShort=sec
|
||||
Rate=Rate
|
||||
CurrencyRate=Currency conversion rate
|
||||
UseLocalTax=Include tax
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user