import re
TIMESTRING_RE = re.compile(re.sub('[\t\n]','',re.sub('(\(\?\#[^\)]+\))','',r'''
	(
		((?P<prefix>between|from|before|after|\>=?|\<=?|greater\sth(a|e)n(\sa)?|less\sth(a|e)n(\sa)?)\s)?
		(
			(
				((?P<ref>next|last|prev(ious)?|this)\s)?
				(?P<main>
					(?# =-=-=-= Matches:: number-frame-ago?, "4 weeks", "sixty days ago" =-=-=-= )
					(
						(?P<num>((\d+|couple(\sof)?|one|two|twenty|twelve|three|thirty|thirteen|four(teen|ty)?|five|fif(teen|ty)|six(teen|ty)?|seven(teen|ty)?|eight(een|y)?|nine(teen|ty)?|ten|eleven|hundred)\s)*)
						(?P<delta>minutes?|hours?|days?|weeks?|months?|quarters?|years?)(\s(?P<ago>ago))?
					)
						|
					
					(?# =-=-=-= Matches Days =-=-=-= )	
					(?P<day_2>yesterday|today|now|tomorrow|monday|tuesday|wednesday|thursday|friday|saturday|sunday|mon|tues?|wedn?|thur?|fri|sat|sun)
						|
						
					(?# =-=-=-= Matches "january 5, 2012", "january 5th, '12", "jan 5th 2012" =-=-=-= )
					((?P<month>january|february|march|april|june|july|august|september|october|november|december|jan|feb|mar|apr|may|jun|jul|aug|sept?|oct|nov|dec)\s((?P<date>\d{1,2})(th|nd|st|rd)?)(,?\s(?P<year>([12][089]|')?\d{2}))?)
						|
						
					(?# =-=-=-= Matches "5/23/2012", "2012/12/11" =-=-=-= )
					(
						((?P<year_3>[12][089]\d{2})[/-](?P<month_3>[01]?\d)([/-](?P<date_3>[0-3]?\d))?)
							|
						((?P<month_2>[01]?\d)[/-](?P<date_2>[0-3]?\d)[/-](?P<year_2>([12][089])?\d{2}))
					)
						|
						
					(?# =-=-=-= Matches "01:20", "6:35 pm", "7am", "noon" =-=-=-= )
					((
						((?P<hour>[012]?[0-9]):(?P<minute>[0-5]\d)\s?(?P<am>am|pm|p|a))
							|
						((?P<hour_2>[012]?[0-9]):(?P<minute_2>[0-5]\d))
							|
						((?P<hour_3>[012]?[0-9])\s?(?P<am_1>am|pm|p|a|o'?clock))
							|
						(?P<daytime>(after)?noon|morning|((around|about|near|by)\s)?this\stime|evening|(mid)?night(time)?)
					))
				)
			)
			(?# =-=-=-= Conjunctions =-=-=-= )
			,?(\s(on|at|of|by|and|to|@))?\s?
		)+
	)
	''')), re.I)