>> Hi all, I need to receive in input a date represented by a string in >> the form "yyyy/mm/dd" (or reversed), then I need to assure that the >> date is = the current date and then split the dates in variables like >> year, month, day. Is there some module to do this quickly?
The dateutil package has a parser module which works well here: >>> import dateutil.parser, datetime >>> dateutil.parser.parse("2008/03/31") datetime.datetime(2008, 3, 31, 0, 0) >>> dateutil.parser.parse("2008/03/31") > datetime.datetime.now() False -- Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/ -- http://mail.python.org/mailman/listinfo/python-list