mō ôÔ5;c@sųdZdZdZdkZdfd„ƒYZdfd„ƒYZdefd „ƒYZd fd „ƒYZd fd „ƒYZe djokedddƒZ edddƒZ edddƒZ e i dƒedddƒZedddƒZndS(sY ODMG type classes for date/time handling These are built on top of the basic DateTime[Delta] types and include rudimentary time zone handling through an offset in minutes. It is the applications responsibility to set the offset to correct values. The offsets are then used in date calculations. The implementation has not yet been thoroughly tested, but provides a good example of the swiftness with which you can build new date/time classes on top of the two basic types. If you find any errors or would like to see new features, mail them to mal@lemburg.com. s0.1alphas*Marc-Andre Lemburg, mailto:mal@lemburg.comNt _EmptyClasscBstZRS(N(t__name__t __module__(((t;/data/zmath/lib/python2.4/site-packages/mx/DateTime/ODMG.pyRstDatecBsMtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS( NicGstti|ƒ|_dS(N(tapplytDateTimetargstselftdata(RR((Rt__init__scCs ||_dS(N(toffsetR(RR ((Rt set_timezonescCst|i|ƒS(N(tgetattrRR twhat(RR((Rt __getattr__"scCsât|tƒov|i|ijo0|i|iti|i|iti}n|i|i}t ƒ}t |_ ||_|SnYt|t ƒo?|i|i}t ƒ}t|_ ||_|i|_|Sn t d‚dS(Nsoperation not supported(t isinstancetotherRRR R Rt oneMinutetdRtotIntervalt __class__t TypeError(RRRR((Rt__sub__&s 0       cCs\t|tƒo?|i|i}tƒ}t|_ ||_|i |_ |Sn t d‚dS(Nsoperation not supported( RRRRR RRRRRR R(RRRR((Rt__add__>s    cCs t|iƒS(N(tstrRR (R((Rt__str__JscCsdt|iƒt|ƒfS(Ns(RRR tid(R((Rt__repr__Ms( RRR R R RRRRR(((RRs     t TimestampcBstZd„ZRS(NcCsdt|iƒt|ƒfS(Ns!(RRR R(R((RRRs(RRR(((RRPstTimecBs>tZd„Zd„Zd„Zd„Zd„Zd„ZRS(NcGstti|ƒ|_dS(N(RRt TimeDeltaRRR (RR((RR WscCst|i|ƒS(N(R RR R(RR((RR[scCs“t|tƒo3|i|i}tƒ}t|_ ||_|SnMt|tƒo3|i|i}tƒ}t|_ ||_|Sn t d‚dS(Nsoperation not supported( RRRRR RRRRRR(RRRR((RR_s      cCs“t|tƒo3|i|i}tƒ}t|_ ||_|SnMt|tƒo3|i|i}tƒ}t|_ ||_|Sn t d‚dS(Nsoperation not supported( RRRRR RRRRRR(RRRR((RRps      cCs t|iƒS(N(RRR (R((RRscCsdt|iƒt|ƒfS(Ns