Commit d4093c24 authored by 's avatar

*** empty log message ***

parent 32797bc3
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"""Encapsulation of date/time values""" """Encapsulation of date/time values"""
__version__='$Revision: 1.6 $'[11:-2] __version__='$Revision: 1.7 $'[11:-2]
import sys,os,regex,DateTimeZone import sys,os,regex,DateTimeZone
...@@ -1069,62 +1069,48 @@ class DateTime: ...@@ -1069,62 +1069,48 @@ class DateTime:
self._hour,self._minute,self._nearsec,self._tz) self._hour,self._minute,self._nearsec,self._tz)
# New formats useful with DocumentTemplates # New formats
def mo_d_y4_hm_pm_z(self): def fCommon(self):
"""Return a string representing the object\'s value """Return a string representing the object\'s value
in the format: Mar 1, 1997 1:45 pm US/Eastern""" in the format: March 1, 1997 1:45 pm"""
return '%s %s, %4.4d %d:%2.2d %s %s' % ( return '%s %s, %4.4d %s:%2.2d %s' % (
self._amon,self._day,self._year,self._pmhour, self._fmon,self._day,self._year,self._pmhour,
self._minute,self._pm,self._tz) self._minute,self._pm)
def Mo_d_y4_hm_pm_z(self): def fCommonZ(self):
"""Return a string representing the object\'s value """Return a string representing the object\'s value
in the format: March 1, 1997 1:45 pm US/Eastern""" in the format: March 1, 1997 1:45 pm US/Eastern"""
return '%s %s, %4.4d %s:%2.2d %s %s' % ( return '%s %s, %4.4d %d:%2.2d %s %s' % (
self._fmon,self._day,self._year,self._pmhour, self._fmon,self._day,self._year,self._pmhour,
self._minute,self._pm,self._tz) self._minute,self._pm,self._tz)
def mo_d_y4_hm_pm(self): def aCommon(self):
"""Return a string representing the object\'s value """Return a string representing the object\'s value
in the format: Mar 1, 1997 1:45 pm""" in the format: Mar 1, 1997 1:45 pm"""
return '%s %s, %4.4d %s:%2.2d %s' % ( return '%s %s, %4.4d %s:%2.2d %s' % (
self._amon,self._day,self._year,self._pmhour, self._amon,self._day,self._year,self._pmhour,
self._minute,self._pm) self._minute,self._pm)
def Mo_d_y4_hm_pm(self): def aCommonZ(self):
"""Return a string representing the object\'s value """Return a string representing the object\'s value
in the format: March 1, 1997 1:45 pm""" in the format: Mar 1, 1997 1:45 pm US/Eastern"""
return '%s %s, %4.4d %s:%2.2d %s' % ( return '%s %s, %4.4d %d:%2.2d %s %s' % (
self._fmon,self._day,self._year,self._pmhour, self._amon,self._day,self._year,self._pmhour,
self._minute,self._pm) self._minute,self._pm,self._tz)
def D_mo_d_y4_hm_pm(self):
"""Return a string representing the object\'s value
in the format: Saturday Mar 1, 1997 1:45 pm"""
return '%s %s %s, %4.4d %s:%2.2d %s' % (
self._fday,self._amon,self._day,self._year,
self._pmhour,self._minute,self._pm)
def D_Mo_d_y4_hm_pm(self):
"""Return a string representing the object\'s value
in the format: Saturday March 1, 1997 1:45 pm"""
return '%s %s %s, %4.4d %s:%2.2d %s' % (
self._fday,self._amon,self._day,self._year,
self._pmhour,self._minute,self._pm)
def d_Mo_d_y4_hm_pm(self): def pCommon(self):
"""Return a string representing the object\'s value """Return a string representing the object\'s value
in the format: Sat March 1, 1997 1:45 pm""" in the format: Mar. 1, 1997 1:45 pm"""
return '%s %s %s, %4.4d %s:%2.2d %s' % ( return '%s %s, %4.4d %s:%2.2d %s' % (
self._aday,self._fmon,self._day,self._year, self._pmon,self._day,self._year,self._pmhour,
self._pmhour,self._minute,self._pm) self._minute,self._pm)
def d_mo_d_y4_hm_pm(self): def pCommonZ(self):
"""Return a string representing the object\'s value """Return a string representing the object\'s value
in the format: Sat Mar 1, 1997 1:45 pm""" in the format: Mar. 1, 1997 1:45 pm US/Eastern"""
return '%s %s %s, %4.4d %s:%2.2d %s' % ( return '%s %s, %4.4d %d:%2.2d %s %s' % (
self._aday,self._amon,self._day,self._year, self._pmon,self._day,self._year,self._pmhour,
self._pmhour,self._minute,self._pm) self._minute,self._pm,self._tz)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment