From fd11fb45b77d54ab2d68ea5770a306401bdfd22b Mon Sep 17 00:00:00 2001 From: River Kelly <65210753+RK311y@users.noreply.github.com> Date: Sat, 11 Nov 2023 07:52:48 -0700 Subject: [PATCH 1/2] Add documentation --- docs/development/legacy/libraries/localization.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/development/legacy/libraries/localization.md b/docs/development/legacy/libraries/localization.md index 9749d134f..43813ad81 100755 --- a/docs/development/legacy/libraries/localization.md +++ b/docs/development/legacy/libraries/localization.md @@ -74,13 +74,14 @@ 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]]])` +### `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. From b2e2edcb5c855ac825e9577075baa0b1e0c8d6e8 Mon Sep 17 00:00:00 2001 From: River Kelly <65210753+RK311y@users.noreply.github.com> Date: Sat, 11 Nov 2023 07:54:03 -0700 Subject: [PATCH 2/2] Update markdown table formatting (i.e. spaces) --- docs/development/legacy/libraries/localization.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/development/legacy/libraries/localization.md b/docs/development/legacy/libraries/localization.md index 43813ad81..3e2050a24 100755 --- a/docs/development/legacy/libraries/localization.md +++ b/docs/development/legacy/libraries/localization.md @@ -76,13 +76,13 @@ Similar to PHP's `strtotime()`, the Localize class provides a way to take a pre- ### `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 | +| 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.