79 chars or more?

Neil Cerutti neilc at norwich.edu
Wed Aug 18 13:37:45 EDT 2010


On 2010-08-18, D'Arcy J.M. Cain <darcy at druid.net> wrote:
> The other thing that jumps out at me is having the input format
> different than the output format.  In any case you need a
> better date input function.  There's no reason in this day and
> age to force users into a particular input form.  You should
> think about creating a utility function that converts any date
> that is unambiguous.  My scripts generally accept all of the
> following.

Under the hood, translate_date just use strptime and strftime, so
the formats are whatever those functions support. Moreover, I'm
converting one known format (the one in the XML) to another
required format (the one required by another program). There's no
need to guess the format.

-- 
Neil Cerutti



More information about the Python-list mailing list