Package zope :: Package interface :: Package common :: Module idatetime :: Class IDate
[show private | hide private]
[frames | no frames]

Type IDate

Interface --+    
            |    
   IDateClass --+
                |
               IDate

Known Subclasses:
IDateTime

Represents a date (year, month and day) in an idealized calendar.

Operators:

__repr__, __str__ __cmp__, __hash__ __add__, __radd__, __sub__ (add/radd only with timedelta arg)
Class Variable Summary
method-wrapper __str__ = <method-wrapper object at 0xb46b3e0c>
str ctime = "Return a string representing the date.\n\n     ...
str day = 'Between 1 and the number of days in the given mon...
str fromordinal = 'Return the date corresponding to the prol...
str fromtimestamp = "Return the local date from a POSIX time...
str isocalendar = 'Return a 3-tuple, (ISO year, ISO week num...
str isoformat = "Return a string representing the date in IS...
str isoweekday = 'Return the day of the week as an integer.\...
str max = 'The latest representable date'
str min = 'The earliest representable date'
str month = 'Between 1 and 12 inclusive'
str replace = 'Return a date with the same value.\n\n       ...
str resolution = 'The smallest difference between non-equal ...
str strftime = 'Return a string representing the date.\n\n  ...
str timetuple = 'Return a 9-element tuple of the form return...
str today = 'Return the current local time.\n\n        This ...
str toordinal = 'Return the proleptic Gregorian ordinal of t...
str weekday = 'Return the day of the week as an integer.\n\n...
str year = 'Between MINYEAR and MAXYEAR inclusive.'

Class Variable Details

__str__

Type:
method-wrapper
Value:
<method-wrapper object at 0xb46b3e0c>                                  

ctime

Type:
str
Value:
"""Return a string representing the date.

        For example date(2002, 12, 4).ctime() == 'Wed Dec 4 00:00:00 2\
002'.
        d.ctime() is equivalent to time.ctime(time.mktime(d.timetuple(\
)))
        on platforms where the native C ctime() function
        (which time.ctime() invokes, but which date.ctime() does not i\
...                                                                    

day

Type:
str
Value:
'Between 1 and the number of days in the given month of the given year\
.'                                                                     

fromordinal

Type:
str
Value:
'''Return the date corresponding to the proleptic Gregorian ordinal.

         January 1 of year 1 has ordinal 1. ValueError is raised unles\
s
         1 <= ordinal <= date.max.toordinal().
         For any date d, date.fromordinal(d.toordinal()) == d.
         '''                                                           

fromtimestamp

Type:
str
Value:
"""Return the local date from a POSIX timestamp (like time.time())

        This may raise ValueError, if the timestamp is out of the rang\
e of
        values supported by the platform C localtime() function. It's \
common
        for this to be restricted to years from 1970 through 2038. Not\
e that
...                                                                    

isocalendar

Type:
str
Value:
'''Return a 3-tuple, (ISO year, ISO week number, ISO weekday).

        The ISO calendar is a widely used variant of the Gregorian cal\
endar.
        See http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm for \
a good
        explanation.

...                                                                    

isoformat

Type:
str
Value:
"""Return a string representing the date in ISO 8601 format.

        This is 'YYYY-MM-DD'.
        For example, date(2002, 12, 4).isoformat() == '2002-12-04'.
        """                                                            

isoweekday

Type:
str
Value:
'''Return the day of the week as an integer.

        Monday is 1 and Sunday is 7. For example,
        date(2002, 12, 4).isoweekday() == 3, a Wednesday.

        See also weekday(), isocalendar().
        '''                                                            

max

Type:
str
Value:
'The latest representable date'                                        

min

Type:
str
Value:
'The earliest representable date'                                      

month

Type:
str
Value:
'Between 1 and 12 inclusive'                                           

replace

Type:
str
Value:
'''Return a date with the same value.

        Except for those members given new values by whichever keyword
        arguments are specified. For example, if d == date(2002, 12, 3\
1), then
        d.replace(day=26) == date(2000, 12, 26). 
        '''                                                            

resolution

Type:
str
Value:
'The smallest difference between non-equal date objects'               

strftime

Type:
str
Value:
'''Return a string representing the date.

        Controlled by an explicit format string. Format codes referrin\
g to
        hours, minutes or seconds will see 0 values.
        '''                                                            

timetuple

Type:
str
Value:
'''Return a 9-element tuple of the form returned by time.localtime().

        The hours, minutes and seconds are 0, and the DST flag is -1.
        d.timetuple() is equivalent to
        (d.year, d.month, d.day, 0, 0, 0, d.weekday(), d.toordinal() -
        date(d.year, 1, 1).toordinal() + 1, -1)
        '''                                                            

today

Type:
str
Value:
'''Return the current local time.

        This is equivalent to date.fromtimestamp(time.time())'''       

toordinal

Type:
str
Value:
'''Return the proleptic Gregorian ordinal of the date

        January 1 of year 1 has ordinal 1. For any date object d,
        date.fromordinal(d.toordinal()) == d.
        '''                                                            

weekday

Type:
str
Value:
'''Return the day of the week as an integer.

        Monday is 0 and Sunday is 6. For example,
        date(2002, 12, 4).weekday() == 2, a Wednesday.

        See also isoweekday().
        '''                                                            

year

Type:
str
Value:
'Between MINYEAR and MAXYEAR inclusive.'                               

Generated by Epydoc 2.1 on Fri Jun 24 12:01:23 2005 http://epydoc.sf.net