function date_order_translated in Date 8
Same name and namespace in other branches
- 5.2 date_api.module \date_order_translated()
- 6.2 date_api.module \date_order_translated()
- 7.3 date_api/date_api.module \date_order_translated()
- 7 date_api/date_api.module \date_order_translated()
- 7.2 date_api/date_api.module \date_order_translated()
Helper function for converting back and forth from '+1' to 'First'.
2 calls to date_order_translated()
- date_repeat_dow_count_options in date_repeat/
date_repeat.module - Helper function for BYDAY options.
- _date_repeat_rrule_process in date_repeat/
date_repeat_form.inc - Generate the repeat setting form.
File
- date_api/
date_api.module, line 361 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
Code
function date_order_translated() {
return array(
'+1' => t('First', array(), array(
'context' => 'date_order',
)),
'+2' => t('Second', array(), array(
'context' => 'date_order',
)),
'+3' => t('Third', array(), array(
'context' => 'date_order',
)),
'+4' => t('Fourth', array(), array(
'context' => 'date_order',
)),
'+5' => t('Fifth', array(), array(
'context' => 'date_order',
)),
'-1' => t('Last', array(), array(
'context' => 'date_order_reverse',
)),
'-2' => t('Next to last', array(), array(
'context' => 'date_order_reverse',
)),
'-3' => t('Third from last', array(), array(
'context' => 'date_order_reverse',
)),
'-4' => t('Fourth from last', array(), array(
'context' => 'date_order_reverse',
)),
'-5' => t('Fifth from last', array(), array(
'context' => 'date_order_reverse',
)),
);
}