File path: dist/twist/Core/Utilities/DateTime.utility.php
Namespace: Twist\Core\Utilities
Extends: Base
Type: Utility
DateTime
— Simply format data and time strings, generate human readable age of any given date. For example 120 will become "2 minutes" provide a timestamp and the age can be presented as "10 minutes ago". Work with date ranges and producing on screen calendars.
<?php
//Set the variables for the example
$strFormat = 'Y-m-d;
$intTimestamp = null;
//Call the function date with the example vars
Twist::DateTime() -> date($strFormat, $intTimestamp);
Method | Access | Returns |
---|---|---|
__construct | construct | void |
time | public | void |
date | public | void |
inFuture | public | void |
inPast | public | void |
prettyAge | public | void |
prettyTime | public | void |
getAge | public | void |
getTimePeriod | public | void |
getPersonAge | public | void |
getDayBetweenDates | public | void |