Returns the localized representation of the date/time.
- return: a full date representation
string
date_intl
(string $date_format, int $stamp)
-
string
$date_format: date_format The format for the date, like the input for the PHP date() function.
-
int
$stamp: stamp the timestamp to convert
getDateString (line
344 )
Returns a short representation of the date, taking timezones and localization into account.
Depending on user's settings, this string can be of the form: "14:23" or "Jun 14, 2003" depending on whether the stamp is "today" or not.
string
getDateString
(int $stamp, [boolean $return_full_date_and_time = FALSE])
-
int
$stamp: The timestamp
-
boolean
$return_full_date_and_time: When TRUE, ignore all user settings and use full date and time (OPTIONAL; default FALSE)
Like getDayName, but returns the short form
- return: the day in short human readable form
string
getDayAbrv
(int $day_number)
-
int
$day_number: day_number the day number
Returns the (localized) string for a given day number.
Switch system has been intentionaly chosen for the internationalization of month and day names. The reason is to make sure that _("") strings will go into the main po.
- return: the day in human readable form
string
getDayName
(int $day_number)
-
int
$day_number: day_number the day number
Corrects a time stamp to be the local time.
- return: the corrected timestamp
int
getGMTSeconds
(int $stamp, string $tzc)
-
int
$stamp: stamp the timestamp to adjust
-
string
$tzc: tzc the timezone correction
getLongDateString (line
309 )
This returns a date of the format "Wed, Oct 29, 2003 9:52 am", or the same in 24H format (depending on the user's settings), and taking localization into accout.
- return: the long date string
string
getLongDateString
(int $stamp, [string $fallback = ''])
-
int
$stamp: stamp the timestamp
-
string
$fallback: fallback string to use when stamp not valid
Returns the (localized) string for a given month number, short representation.
- return: the shortened month in human readable form
string
getMonthAbrv
(string $month_number)
-
string
$month_number: month_number the month number (01..12)
Returns the (localized) string for a given month number.
- return: the month name in human readable form
string
getMonthName
(string $month_number)
-
string
$month_number: month_number the month number (01..12)
Decodes a RFC 822 Date-header into a timestamp
- return: the timestamp calculated from the header
int
getTimeStamp
(array $dateParts)
-
array
$dateParts: dateParts the Date-header split by whitespace