125
131
// If $time is not in format yyyy-mm-dd
126
132
if (!preg_match('/^\d{0,4}-\d{0,2}-\d{0,2}$/', $time)) {
129
134
// strftime to make yyyy-mm-dd
130
135
$time = strftime('%Y-%m-%d', smarty_make_timestamp($time));
132
137
// Now split this in pieces, which later can be used to set the select
133
138
$time = explode("-", $time);
135
140
// make syntax "+N" or "-N" work with start_year and end_year
136
141
if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) {