| Fully Qualified Name: | CodeIgniter\I18n\TimeDifference |
Class TimeDifference
| Name | Description | Defined By |
|---|---|---|
| __construct() | Note: both parameters are required to be in the same timezone. No timezone shifting is done internally. | TimeDifference |
| __get() | Allow property-like access to our calculated values. | TimeDifference |
| __isset() | Allow property-like checking for our calculated values. | TimeDifference |
| getDays() | Returns the number of days difference between the two dates. | TimeDifference |
| getHours() | Returns the number of hours difference between the two dates. | TimeDifference |
| getMinutes() | Returns the number of minutes difference between the two dates. | TimeDifference |
| getMonths() | Returns the number of months difference between the two dates. | TimeDifference |
| getSeconds() | Returns the number of seconds difference between the two dates. | TimeDifference |
| getWeeks() | Returns the number of weeks difference between the two dates. | TimeDifference |
| getYears() | Returns the number of years of difference between the two. | TimeDifference |
| humanize() | Convert the time to human readable format | TimeDifference |
Note: both parameters are required to be in the same timezone. No timezone shifting is done internally.
| Parameter Name | Type | Description |
|---|---|---|
| $currentTime | \DateTime | |
| $testTime | \DateTime |
Returns:
Allow property-like access to our calculated values.
| Parameter Name | Type | Description |
|---|---|---|
| $name | ||
| $name |
Returns: mixed
Allow property-like checking for our calculated values.
| Parameter Name | Type | Description |
|---|---|---|
| $name | ||
| $name |
Returns: bool
Returns the number of days difference between the two dates.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: float|int
Returns the number of hours difference between the two dates.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: float|int
Returns the number of minutes difference between the two dates.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: float|int
Returns the number of months difference between the two dates.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: float|int
Returns the number of seconds difference between the two dates.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: int
Returns the number of weeks difference between the two dates.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: float|int
Returns the number of years of difference between the two.
| Parameter Name | Type | Description |
|---|---|---|
| $raw | bool |
Returns: float|int
Convert the time to human readable format
| Parameter Name | Type | Description |
|---|---|---|
| $locale | string|null |
Returns: string