Class Jyxo_Time_Time
Class for working with date and time. Internally uses a DateTime object. Initialization is possible using almost any date/time format (unix timestamp, SQL form, ...).
Requires the Gettext PHP extension or any other implementation of the _(string) translation function.
- Jyxo_Time_Time implements Serializable
Package: Jyxo_Time
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav Hanslík
Author: Jan Kolibač
Author: Roman Řáha
Author: Martin Šamšula
Author: Ondřej Nešpor
Located at Time/Time.php
public
|
#
__construct( string|integer|
Constructor. |
protected
|
#
createTimeZone( string|
Creates a DateTimeZone object from a time zone definition |
public static
|
#
get( string|integer|
Helper function for creating an instance with the given date/time. |
public static
|
|
public static
|
#
createFromFormat( string $format, string $time )
Creates an instance using a date/time definition in the given format. |
public
mixed
|
|
public
mixed
|
|
public
string
|
|
public
|
|
public
|
|
protected
|
|
protected
|
|
public
string
|
#
format( string $format, string|
Returns date/time in the given format with months and days translated. |
public
string
|
#
formatExtended( string $dateFormat = 'j. F Y', string $timeFormat = 'G:i', string|
Returns date/time in the form of: |
public
string
|
#
formatAsInterval( boolean $useTense = true, string|
Function for formatting time differences into human readable forms. |
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
string
|
|
public
|
string
|
SECOND
|
'second' |
#
Second. |
string
|
MINUTE
|
'minute' |
#
Minute. |
string
|
HOUR
|
'hour' |
#
Hour. |
string
|
DAY
|
'day' |
#
Day. |
string
|
WEEK
|
'week' |
#
Week. |
string
|
MONTH
|
'month' |
#
Month. |
string
|
YEAR
|
'year' |
#
Year. |
integer
|
INTERVAL_SECOND
|
1 |
#
Number of seconds in a second. |
integer
|
INTERVAL_MINUTE
|
60 |
#
Number of seconds in a minute. |
integer
|
INTERVAL_HOUR
|
3600 |
#
Number of seconds in an hour. |
integer
|
INTERVAL_DAY
|
86400 |
#
Number of seconds in a day. |
integer
|
INTERVAL_WEEK
|
604800 |
#
Number of seconds in a week. |
integer
|
INTERVAL_MONTH
|
2592000 |
#
Number of seconds in a month. |
integer
|
INTERVAL_YEAR
|
31536000 |
#
Number of seconds in a year. |