Photo, that was the thread I had in mind. I thought it applied.
John, it looks relatively simple to do. Take a look at /admin/main.php
See line 57:
Code:
$start_dates[] = $previous_login_date; // Since last login
$start_dates[] = func_prepare_search_date($curtime) - $config['Appearance']['timezone_offset']; // Today
$start_week = $curtime - date('w', $curtime) * 24 * 3600; // Week starts since Sunday
$start_dates[] = func_prepare_search_date($start_week) - $config['Appearance']['timezone_offset']; // Current week
$start_dates[] = mktime(0, 0, 0, date('m', $curtime), 1, date('Y', $curtime)) - $config['Appearance']['timezone_offset']; // Current month
These examples should give you what you need to setup your own searches. Just subtract from $curtime the number of seconds that you want to back.
Also take a look at the foreach statement
Code:
foreach($start_dates as $start_date) {
To see how the $start_dates array is treated, to better understand what is happening here.