Dates and times in Python
Archive - Originally posted on "The Horse's Mouth" - 2010-07-27 06:42:38 - Graham EllisPython comes with a great variety of standard classes - including some very neat ones to handle dates and times. [Here] is a link to an example written on last week's Python course which took a couple of dates as strings, split them down and proceeded with date arithmetic. I always have to marvel at the beauty of Python when I can do things like subtract one date from another and get a difference - all with a simple minus sign!
So we know that Adam - one of my delegates - was 17407 days old on the day of the course (he didn't buy us a cake to celebrate that birthday, but he's a wonderful delegate to teach!), and that he's Saturday's child.