format_date (function)
Last updated: Tue, Jan 3, 2023 11:15 am
Return to Knowledgebase
Purpose
Formats a date from Y-m-d H:i:s to m/d/y ~ h:iA
Location
users/helpers/deprecated.php
Version Information
First Introduced |
v2.5.0 |
Deprecated |
v5.0.2 |
Parameters
# |
Parameter |
Data Type |
Required |
Description |
1 |
$date |
string |
Yes |
Date string in Y-m-d H:i:s format |
2 |
$tz |
string |
Yes |
PHP Timezone in continent/city format |
Returns
Data Type |
Description of Returned Data |
string |
Returns a date string in m/d/y ~ h:iA format |
Example
echo abrev_date("2022-01-01 00:00:00", "Africa/Tripoli");
Further Documentation:
This is a legacy function from the UserCake days and has been deprecated.