-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
timeformat
Description
Returns a pretty formatted version of time based on the user's format in $user_info['time_format'].
Syntax
string timeformat (int $time[, bool $show_today[, mixed $offset_type]])
Parameter $time
Expected type: Integer
Description: A unix timestamp
Parameter $show_today
Expected type: Boolean
Description: Whether or not to force the display based on the "Today" settings. Default is true
Parameter $offset_type
Expected type: Mixed
Description: Allows you to ignore all offsets or just the user offset
Allowed types for $offset_type Allowed values Description Boolean If false, will apply both the forum and the user time offsets. Default value. String If 'forum', will only apply the forum time offset. Otherwise it won't apply either time offset
Return value
Expected type: String
Description: The formatted time/date string with offsets applied (if applicable)
Notes
- Applies any necessary time offsets to the timestamp.
- If todayMod is set and show_today was not not specified or true, an alternate format string is used to show the date with something to show it is "today" or "yesterday".
- Performs localization (more than just strftime would do alone.)
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.125 seconds with 13 queries.
- Forum Search