How can I hack strftime functionality?
Posted: Wed Feb 27, 2008 11:24 pm
Ok strftime covers the most time formattings. But I missing one tag and that is month as a number without leading zeroes (range 1 to 12)
This is quite strange because there is day of the month (1-31) without leading zeroes (%e) but not month
There is a php-code to strip zeroes, like this:
But how can I implement/hack it in CMS:MS so I can use it in all date format strings, for example the news or comments module .
This is quite strange because there is day of the month (1-31) without leading zeroes (%e) but not month

There is a php-code to strip zeroes, like this:
Code: Select all
function strip_zeros_from_date( $marked_date_string ) {
$cleaned_string = str_replace('*', '', str_replace('*0', '', $marked_date_string));
return $cleaned_string;
}