I'm working on a journal-type application in Python. The application basically permits the user write entries in the journal and adds a time-stamp for later querying the journal.
As of now, I use the time.ctime() function to generate time-stamps that are visually friendly. The journal entries thus look like:
Thu Jan 21 19:59:47 2010 Did something
Thu Jan 21 20:01:07 2010 Did something else
Now, I would like to be able to use these time-stamps to do some searching/querying. I need to be able to search, for example, for "2010", or "feb 2010", or "23 feb 2010".
My questions are:
1) What time module(s) should I use: time vs datetime?
2) What would be an appropriate way of creating and using the time-stamp objects?
Many thanks!