Class List
- App\Middleware\Cors
- App\Middleware\Auth
- App\Middleware\Env
- AppMin
- Application
- Route
- Data\Database
- Data\Db2Database
- Data\OdbcDatabase
- Data\Validator
- Data\KeyValue\SqliteStorage
- Data\Log\FileLogger
- Data\Log\HtmlLogger
- Encoding\Base64Url
- Encoding\Json
- Encoding\Utf8
- Environment\DotEnv
- Environment\System
- FileSystem\Search
- FileSystem\Security
- FileSystem\Sync
- Lang\I18N
- Lang\L10N
- Lang\Time
- Media\Image
- Net\Config
- Net\Email
- Net\HttpClient
- Net\HttpResponse
- Net\IP
- Net\SmtpClient
- Security\Crypto
- Security\Password
- Security\Crypto\Encryption
- Security\Crypto\FileEncryption
- Security\Crypto\JWT
- Security\Crypto\PublicKey
- Security\Crypto\Random
- Security\Crypto\SignedData
- Security\Web\CsrfSession
- Security\Web\CsrfStateless
- Security\Web\RateLimit
- Web\Request
- Web\Response
FastSitePHP\Lang\Time
Helper class to display time text strings.
Source Code
Methods
secondsToText($seconds)
Static Function
Convert the number of seconds into an English text string.
Example:
Time::secondsToText(129680) = 1 Day, 12 Hours, 1 Minute, and 20 Seconds
Time::secondsToText(120) = 2 Minutes
Time::secondsToText(119) = 1 Minute and 59 Seconds
Time::secondsToText(10) = 10 Seconds
For a basic numeric format of 'HH:MM:SS' you can instead use a PHP built-in function as long as the time is less than 24 hours:
date('H:i:s', $seconds)
Returns: string