Bug Report #1152
date::timespan_string shouldn't return last difference if it's empty
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Helpers | |||
| Target version: | 2.3.3 | |||
| Resolution: | fixed | Points: |
Description
date::timespan_string(0, 3600) returns '1 hour and 0 seconds'
it should just return '1 hour'
Changing date.php:378
from
if ($name !== $last AND $amount === 0)
to
if ($amount === 0)
resolves the problem.
I can't see any reason to not skip the last section if it's 0
History
Updated by Kiall Mac Innes almost 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset r4312.
Updated by Kiall Mac Innes almost 3 years ago
- Assignee set to Kiall Mac Innes
Updated by Kiall Mac Innes almost 3 years ago
- Resolution set to fixed