Module YahooQuote :: Class QuoteDate
[show private | hide private]
[frames | no frames]

Type QuoteDate

object --+    
         |    
       int --+
             |
            QuoteDate


Simple int subclass that represents yyyymmdd quote dates
Method Summary
  __init__(self, val)
Create a QuoteDate object.
  __add__(self, n)
Adds n days to this QuoteDate, and returns a new QuoteDate object
  __sub__(self, n)
Subtracts n days from this QuoteDate, and returns a new QuoteDate object
  fromUnix(udate)
Static method - converts a unix 'seconds since epoch' date into a QuoteDate string (Static method)
  fromYahoo(ydate)
Static method - converts a 'yyyy-mmm-dd' yahoo date into a QuoteDate object (Static method)
  fromYmd(year, month, day)
Static method - instantiates a QuoteDate set to given year, month, day (Static method)
  now()
Static method - returns a QuoteDate object for today (Static method)
  toUnix(self)
Converts this QuoteDate object to a unix 'seconds since epoch' time
  toYmd(self)
returns tuple (year, month, day)
    Inherited from int
  __abs__(x)
x.__abs__() <==> abs(x)
  __and__(x, y)
x.__and__(y) <==> x&y
  __cmp__(x, y)
x.__cmp__(y) <==> cmp(x,y)
  __coerce__(x, y)
x.__coerce__(y) <==> coerce(x, y)
  __div__(x, y)
x.__div__(y) <==> x/y
  __divmod__(x, y)
x.__divmod__(y) <==> divmod(x, y)
  __float__(x)
x.__float__() <==> float(x)
  __floordiv__(x, y)
x.__floordiv__(y) <==> x//y
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __getnewargs__(...)
  __hash__(x)
x.__hash__() <==> hash(x)
  __hex__(x)
x.__hex__() <==> hex(x)
  __index__(...)
x[y:z] <==> x[y.__index__():z.__index__()]
  __int__(x)
x.__int__() <==> int(x)
  __invert__(x)
x.__invert__() <==> ~x
  __long__(x)
x.__long__() <==> long(x)
  __lshift__(x, y)
x.__lshift__(y) <==> x<<y
  __mod__(x, y)
x.__mod__(y) <==> x%y
  __mul__(x, y)
x.__mul__(y) <==> x*y
  __neg__(x)
x.__neg__() <==> -x
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __nonzero__(x)
x.__nonzero__() <==> x != 0
  __oct__(x)
x.__oct__() <==> oct(x)
  __or__(x, y)
x.__or__(y) <==> x|y
  __pos__(x)
x.__pos__() <==> +x
  __pow__(x, y, z)
x.__pow__(y[, z]) <==> pow(x, y[, z])
  __radd__(x, y)
x.__radd__(y) <==> y+x
  __rand__(x, y)
x.__rand__(y) <==> y&x
  __rdiv__(x, y)
x.__rdiv__(y) <==> y/x
  __rdivmod__(x, y)
x.__rdivmod__(y) <==> divmod(y, x)
  __repr__(x)
x.__repr__() <==> repr(x)
  __rfloordiv__(x, y)
x.__rfloordiv__(y) <==> y//x
  __rlshift__(x, y)
x.__rlshift__(y) <==> y<<x
  __rmod__(x, y)
x.__rmod__(y) <==> y%x
  __rmul__(x, y)
x.__rmul__(y) <==> y*x
  __ror__(x, y)
x.__ror__(y) <==> y|x
  __rpow__(y, x, z)
y.__rpow__(x[, z]) <==> pow(x, y[, z])
  __rrshift__(x, y)
x.__rrshift__(y) <==> y>>x
  __rshift__(x, y)
x.__rshift__(y) <==> x>>y
  __rsub__(x, y)
x.__rsub__(y) <==> y-x
  __rtruediv__(x, y)
x.__rtruediv__(y) <==> y/x
  __rxor__(x, y)
x.__rxor__(y) <==> y^x
  __str__(x)
x.__str__() <==> str(x)
  __truediv__(x, y)
x.__truediv__(y) <==> x/y
  __xor__(x, y)
x.__xor__(y) <==> x^y
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Instance Method Details

__init__(self, val)
(Constructor)

Create a QuoteDate object. Argument can be an int or string, as long as it is in the form YYYYMMDD
Overrides:
__builtin__.object.__init__

__add__(self, n)
(Addition operator)

Adds n days to this QuoteDate, and returns a new QuoteDate object
Overrides:
__builtin__.int.__add__

__sub__(self, n)
(Subtraction operator)

Subtracts n days from this QuoteDate, and returns a new QuoteDate object
Overrides:
__builtin__.int.__sub__

toUnix(self)

Converts this QuoteDate object to a unix 'seconds since epoch' time

toYmd(self)

returns tuple (year, month, day)

Static Method Details

fromUnix(udate)

Static method - converts a unix 'seconds since epoch' date into a QuoteDate string

fromYahoo(ydate)

Static method - converts a 'yyyy-mmm-dd' yahoo date into a QuoteDate object

fromYmd(year, month, day)

Static method - instantiates a QuoteDate set to given year, month, day

now()

Static method - returns a QuoteDate object for today

Generated by Epydoc 2.1 on Mon Jun 25 22:42:21 2007 http://epydoc.sf.net