def time_for_period(string=nil)
			
			
			@last_date = case string
			
			when /today/,/now/
				now

			when /tomorrow/
				tomorrow_time

			when /yesterday/
				yesterday_time

			when /sunday/, /monday/, /tuesday/, /wednesday/, /thursday/, /friday/, /saturday/ 				
				time_for_weekday(string)

			when /next/
				now + period_of_time_from_string(string.gsub("next","1"))

			when /last/
				now - period_of_time_from_string(string.gsub("last","1"))				

			when /\d[\sa-zA-Z]+\sbefore/
				@last_date ||= now 
				@last_date -=  period_of_time_from_string(string)

			when /\d[\sa-zA-Z]+\sago/
				@last_date  ||= now 
				now - period_of_time_from_string(string)

			when /\d[\sa-zA-Z]+\slater/
				@last_date ||= now
				@last_date +=  period_of_time_from_string(string)

			when /in/,/\d\sminutes?/,/\d\shours?/,/\d\sdays?/, /\d\smonths?/, /\d\sweeks?/, /\d\syears?/
				now + period_of_time_from_string(string)

			when /\d+.\d+.\d+/
				time_from_date(string)	

			when /rand/,/future/
				now + rand(100_000_000)

			when /past/
				now - rand(100_000_000)
			end
				
				return @last_date
		end
def time_for_period(string=nil)
			
			
			@last_date = case string
			
			when /today/,/now/
				now

			when /tomorrow/
				tomorrow_time

			when /yesterday/
				yesterday_time

			when /sunday/, /monday/, /tuesday/, /wednesday/, /thursday/, /friday/, /saturday/ 				
				time_for_weekday(string)

			when /next/
				now + period_of_time_from_string(string.gsub("next","1"))

			when /last/
				now - period_of_time_from_string(string.gsub("last","1"))				

			when /\d[\sa-zA-Z]+\sbefore/
				@last_date ||= now 
				@last_date -=  period_of_time_from_string(string)

			when /\d[\sa-zA-Z]+\sago/
				@last_date  ||= now 
				now - period_of_time_from_string(string)

			when /\d[\sa-zA-Z]+\slater/
				@last_date ||= now
				@last_date +=  period_of_time_from_string(string)

			when /in/,/\d\sminutes?/,/\d\shours?/,/\d\sdays?/, /\d\smonths?/, /\d\sweeks?/, /\d\syears?/
				now + period_of_time_from_string(string)

			when /\d+.\d+.\d+/
				time_from_date(string)	

			when /rand/,/future/
				now + rand(100_000_000)

			when /past/
				now - rand(100_000_000)
			end
				
				return @last_date
		end
Returns the formatted date according to the given period of time expresed in a literal way

 @param [String] period = time expressed literally (e.g: in 2 days)
 @return [String] formatted time