Project

General

Profile

« Previous | Next » 

Revision cce81b9e

Added by Scott Ullrich over 18 years ago

Add tdr_week() code which verifies which week number that we are currently on. For example calling tdr_week("10,11,12") will evaluate to try if the current week of the year is 10, 11 or 12. As of the time of this commit we are on week 12.

View differences:

etc/inc/pfsense-utils.inc
168 168
	 * week 1, week 2, week 3, week 4
169 169
	 */
170 170
	global $debug;
171
	$week 		= date("W");
171
	$todays_week 		= date("W");
172
	$weeks = split(",", $schedule);
173
	foreach($weeks as $week) {
174
		if($week == $todays_week) 
175
			return true;
176
	}
172 177
	return false;
173 178
}
174 179

  

Also available in: Unified diff