Method: AutomaticCalendar#time_for

Defined in:
lib/helpers/default-helpers.rb

#time_for(month, day = 1) ⇒ Object



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'lib/helpers/default-helpers.rb', line 304

def time_for( month, day = 1 )
	year = Time.now.year
	if month > 12
		year +=1
		month -= 12
	elsif month < 1
		year -= 1
		month = month + 12
	end
	if day > 31
		month += 1
		day -= 31
	end
	Time.local( year, month, day, 8, 0 )
end