Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo 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")