ff6347 / prettytable

Automatically exported from code.google.com/p/prettytable
Other
0 stars 0 forks source link

Add date formatting for datetime etc instances #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It's useful to be able to specify a format for datetime values. I've attached a 
diff that provides this functionality, basically by copying the float and int 
formatting. It's applied to any object with a "strftime" method, which catches 
date, time and datetime.

The validation of the format is pretty minimal, because you can put basically 
anything in a strftime format. I wondered whether it was worth it, but I left 
it as it's easier to extend the checks in the future if needed.

Original issue reported on code.google.com by p.f.mo...@gmail.com on 28 Aug 2014 at 1:31

Attachments:

GoogleCodeExporter commented 8 years ago
This is actually an enhancement request, but I couldn't see a way of setting 
the type :-(

Original comment by p.f.mo...@gmail.com on 28 Aug 2014 at 1:32

GoogleCodeExporter commented 8 years ago
Hey, just want to let you know I've seen your request, and I'll take a look at 
it this weekend. Thanks for your work!

Original comment by john.fil...@gmail.com on 9 Sep 2014 at 11:39

GoogleCodeExporter commented 8 years ago

Original comment by john.fil...@gmail.com on 9 Sep 2014 at 11:42