[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Date and Time Locale object
File Size: | 453 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BB_Locale:: (17 methods):
init()
_load_locale_data()
get_weekday()
get_weekday_initial()
get_weekday_abbrev()
get_month()
get_month_initial()
get_month_abbrev()
get_meridiem()
get_datetime_formatstring()
register_globals()
__construct()
BB_Locale()
bb_gmdate_i18n()
bb_get_datetime_formatstring_i18n()
bb_datetime_format_i18n()
bb_number_format_i18n()
init() X-Ref |
Sets up the translated strings and object properties. The method creates the translatable strings for various calendar elements. Which allows for specifying locale specific calendar names and text direction. |
_load_locale_data() X-Ref |
Imports global locale vars set during inclusion of $locale.php. |
get_weekday($weekday_number) X-Ref |
Retrieve the full translated weekday word. Week starts on translated Sunday and can be fetched by using 0 (zero). So the week starts with 0 (zero) and ends on Saturday with is fetched by using 6 (six). param: int $weekday_number 0 for Sunday through 6 Saturday return: string Full translated weekday |
get_weekday_initial($weekday_name) X-Ref |
Retrieve the translated weekday initial. The weekday initial is retrieved by the translated full weekday word. When translating the weekday initial pay attention to make sure that the starting letter does not conflict. param: string $weekday_name return: string |
get_weekday_abbrev($weekday_name) X-Ref |
Retrieve the translated weekday abbreviation. The weekday abbreviation is retrieved by the translated full weekday word. param: string $weekday_name Full translated weekday word return: string Translated weekday abbreviation |
get_month($month_number) X-Ref |
Retrieve the full translated month by month number. The $month_number parameter has to be a string because it must have the '0' in front of any number that is less than 10. Starts from '01' and ends at '12'. You can use an integer instead and it will add the '0' before the numbers less than 10 for you. param: string|int $month_number '01' through '12' return: string Translated full month name |
get_month_initial($month_name) X-Ref |
No description |
get_month_abbrev($month_name) X-Ref |
Retrieve translated version of month abbreviation string. The $month_name parameter is expected to be the translated or translatable version of the month. param: string $month_name Translated month to get abbreviated version return: string Translated abbreviated month |
get_meridiem($meridiem) X-Ref |
Retrieve translated version of meridiem string. The $meridiem parameter is expected to not be translated. param: string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version. return: string Translated version |
get_datetime_formatstring($type = 'datetime') X-Ref |
No description |
register_globals() X-Ref |
Global variables are deprecated. For backwards compatibility only. |
__construct() X-Ref |
PHP4 style constructor which calls helper methods to set up object variables return: BB_Locale |
BB_Locale() X-Ref |
No description |
bb_gmdate_i18n( $dateformatstring, $unixtimestamp = false, $gmt = true ) X-Ref |
Retrieve the date in localized format, based on timestamp. If the locale specifies the locale month and weekday, then the locale will take over the format for the date. If it isn't, then the date format string will be used instead. param: string $dateformatstring Format to display the date. param: int $unixtimestamp Optional. Unix timestamp. param: bool $gmt Optional, default is true. Whether to convert to GMT for time. return: string The date, translated if locale specifies it. |
bb_get_datetime_formatstring_i18n( $type = 'datetime' ) X-Ref |
No description |
bb_datetime_format_i18n( $unixtimestamp, $type = 'datetime', $formatstring = '', $gmt = true ) X-Ref |
No description |
bb_number_format_i18n( $number, $decimals = null ) X-Ref |
Convert number to format based on the locale. param: mixed $number The number to convert based on locale. param: int $decimals Precision of the number of decimal places. return: string Converted number in string format. since: 2.3.0 |
Generated: Thu Dec 7 01:01:35 2017 | Cross-referenced by PHPXref 0.7.1 |