function antispam_get_counting_since in AntiSpam 6
Same name and namespace in other branches
- 7 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 in ./
antispam.module - Implementation of hook_block().
- antispam_callback_queue in ./
antispam.admin.inc - Menu callback; Moderation queue.
- antispam_help in ./
antispam.module - Implementation of hook_help().
File
- ./
antispam.module, line 1461
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', 0),
'F' => format_date(gmmktime(0, 0, 0, $since['month'], 2, 1970), 'custom', 'F', 0),
'Y' => $since['year'],
);
return strtr($format, $replace);
}