Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions docs/development/legacy/libraries/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ Similar to PHP's `strtotime()`, the Localize class provides a way to take a pre-

## Human-readable time

### `human_time([$timestamp = NULL[, $localize = TRUE[, $seconds = FALSE]]])`

| Parameter | Type | Description |
| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \$timestamp | `Integer` | Unix timestamp |
| \$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 |
| \$seconds | `Boolean` | Whether or not to include seconds, overrides `include_seconds` hidden config |
| Returns | `String` | Human-readable date |
### `human_time([$timestamp = NULL[, $localize = TRUE[, $seconds = FALSE[, $include_time = TRUE]]]])`

| Parameter | Type | Description |
| -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \$timestamp | `Integer` | Unix timestamp |
| \$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 |
| \$seconds | `Boolean` | Whether or not to include seconds, overrides `include_seconds` hidden config |
| \$include_time | `Boolean` | Whether or not to include time |
| Returns | `String` | Human-readable date |

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.

Expand Down