# return the number of the current month (1..12)
function this_month() {
- return ereg_replace('^0', '', strftime('%m'));
+ return preg_replace('|^0|', '', strftime('%m'));
}
# return today's date in yyyy-mm-dd format
return strftime('%Y-%m-%d');
}
+function now_yyyymmdd() {
+ return strftime('%Y-%m-%d');
+}
+
+function now_yyyymmddhhmmss() {
+ return strftime('%Y-%m-%d %H:%M:%S');
+}
+
function get_text_between($text, $start_text, $end_text) {
$start = strpos($text, $start_text);