function antispam_get_counting_since in AntiSpam 7
Same name and namespace in other branches
- 6 antispam.module \antispam_get_counting_since()
Format the 'Counting since' date.
Return value
string Counting since date formatted according to module settings.
3 calls to antispam_get_counting_since()
- antispam_block_view in ./
antispam.module - Implements hook_block_view().
- antispam_callback_queue in ./
antispam.admin.inc - Menu callback; Moderation queue.
- antispam_help in ./
antispam.module - Implements hook_help().
File
- ./
antispam.module, line 1609 - Primary hook implementations for the Antispam module.
Code
function antispam_get_counting_since() {
$since = variable_get('antispam_counter_since', array(
'day' => date('j'),
'month' => date('n'),
'year' => date('Y'),
));
$format = variable_get('antispam_counter_date_format', 'F j, Y');
$replace = array(
'd' => sprintf('%02d', $since['day']),
'j' => $since['day'],
'm' => sprintf('%02d', $since['month']),
'M' => format_date(gmmktime(0, 0, 0, $since['month'], 2, 1970), 'custom', 'M'),
'F' => format_date(gmmktime(0, 0, 0, $since['month'], 2, 1970), 'custom', 'F'),
'Y' => $since['year'],
);
return strtr($format, $replace);
}