Skip to content

Commit cbdebe3

Browse files
authored
Merge pull request #775 from RK311y/fix/localize-human-time
Update Human-readable time for legacy Localize Class (missing $include_time parameter)
2 parents 5d046d7 + b2e2edc commit cbdebe3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/development/legacy/libraries/localization.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ Similar to PHP's `strtotime()`, the Localize class provides a way to take a pre-
7474

7575
## Human-readable time
7676

77-
### `human_time([$timestamp = NULL[, $localize = TRUE[, $seconds = FALSE]]])`
78-
79-
| Parameter | Type | Description |
80-
| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81-
| \$timestamp | `Integer` | Unix timestamp |
82-
| \$localize | `Boolean` | Boolean of whether to use the current member's timezone for localization (TRUE), or to use GMT (FALSE); or string of PHP timezone to use for the localization |
83-
| \$seconds | `Boolean` | Whether or not to include seconds, overrides `include_seconds` hidden config |
84-
| Returns | `String` | Human-readable date |
77+
### `human_time([$timestamp = NULL[, $localize = TRUE[, $seconds = FALSE[, $include_time = TRUE]]]])`
78+
79+
| Parameter | Type | Description |
80+
| -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81+
| \$timestamp | `Integer` | Unix timestamp |
82+
| \$localize | `Boolean` | Boolean of whether to use the current member's timezone for localization (TRUE), or to use GMT (FALSE); or string of PHP timezone to use for the localization |
83+
| \$seconds | `Boolean` | Whether or not to include seconds, overrides `include_seconds` hidden config |
84+
| \$include_time | `Boolean` | Whether or not to include time |
85+
| Returns | `String` | Human-readable date |
8586

8687
Returns a common human-readable date format conforming to ExpressionEngine's [default time formatting setting](control-panel/settings/general.md). This method is most commonly used to express dates in the control panel.
8788

0 commit comments

Comments
 (0)