Ejemplo n.º 1
0
 def FmtDateNumbers(self, date, language=None):
     """
     Formats dates as numbers e.g 13.12.2011.
     
     returns string
     """
     if not date:
         return u""
     if not isinstance(date, datetime):
         date = ConvertToDateTime(date)
     return date.strftime(u"%x")
Ejemplo n.º 2
0
 def FmtDateText(self, date, language=None):
     """
     Formats dates as readable text in conventional format.
     
     returns string
     """
     if not date:
         return u""
     if not isinstance(date, datetime):
         date = ConvertToDateTime(date)
     return date.strftime(u"%c")
Ejemplo n.º 3
0
 def FmtDateNumbers(self, date, language=None):
     """
     Formats dates as numbers e.g 13.12.2011.
     
     returns string
     """
     if not date:
         return u""
     if not isinstance(date, datetime):
         date = ConvertToDateTime(date)
     return date.strftime(u"%x")
Ejemplo n.º 4
0
 def FmtDateText(self, date, language=None):
     """
     Formats dates as readable text in conventional format.
     
     returns string
     """
     if not date:
         return u""
     if not isinstance(date, datetime):
         date = ConvertToDateTime(date)
     return date.strftime(u"%c")
Ejemplo n.º 5
0
 def ConvertDate(self, date):
     if not isinstance(date, datetime):
         date = ConvertToDateTime(date)
     if not date:
         return u""
     return date.strftime(u"%Y-%m-%d %H:%M:%S")
Ejemplo n.º 6
0
 def ConvertDate(self, date):
     if not isinstance(date, datetime):
         date = ConvertToDateTime(date)
     if not date:
         return u""
     return date.strftime(u"%Y-%m-%d %H:%M:%S")