~ubuntu-branches/ubuntu/trusty/buxon/trusty

« back to all changes in this revision

Viewing changes to src/buxon/common/date.py

  • Committer: Bazaar Package Importer
  • Author(s): Nacho Barrientos Arias
  • Date: 2011-08-28 11:36:14 UTC
  • mfrom: (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110828113614-wt8f10vp2z8vbs7s
Tags: 0.0.5-3
* debian/patches (+1 patches)
 - manpage-typos: s/a RDF/an RDF/

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import sys, os, string
21
21
import email.Utils
22
22
import time
23
 
 
 
23
import logging
24
24
 
25
25
class Date:
26
26
    
149
149
        self.date = email.Utils.parsedate(date)
150
150
 
151
151
        if (self.date == None):
152
 
                print 'Error parsing date: non valid format (' + date + ')'
 
152
                logging.error('Error parsing none date, trying alternatives...')
153
153
                #trying another format: dd.mm.yyyy
154
154
                try:            
155
155
                        tmp = date.split('.')