TwistPHP Documentation

prettyTime

File path: dist/twist/Core/Utilities/DateTime.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

prettyTimeTurn a number of seconds into a nicely formatted string eg. '1 Day 2 Hours' or 1d 2h

Parameters

Name Type Description
$intSecondsintegern/a
[$blShortLabels = false]booleann/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$intSeconds 124;
$blShortLabels false;

//Call the function prettyTime with the example vars
Twist::DateTime() -> prettyTime($intSeconds$blShortLabels);