MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/mx/DateTime/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/mx/DateTime/ARPA.pyc
mς
šKX;c
@sbdZdkZdkZdkZdkZdZdZdedZeiZ	de	dZ
ded	eZded	ed
e
Zei
eƒZei
eƒZhdd<d
d<dd<dd<dd<dd<dd<Zhdd<dd<dd<dd<dd<dd<dd <d!d"<d#d$<d%d&<d'd(<d)d*<Zd+d,d-d.d/d0d1gZdd2d3d4d5d6d7d8d9d:d;d<d=g
Zeieieieieid>„Zeieieieieid?„Zeieieieieid@„ZeZddA„ZdB„ZdC„Z dD„Z!e"dEjoe!ƒndS(FsV This module provides a set of constructors and routines to convert
    between DateTime[Delta] instances and ARPA representations of date
    and time. The format is specified by RFC822 + RFC1123.

    Note: Timezones are only interpreted by ParseDateTimeGMT(). All
    other constructors silently ignore the time zone information.

    Copyright (c) 1998-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
    Copyright (c) 2000-2001, eGenix.com Software GmbH; mailto:info@egenix.com
    See the documentation for further information on copyrights,
    or contact the author. All Rights Reserved.

Ns-(?P<litday>Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*sC(?P<litmonth>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*s(?:(?P<day>\d?\d)(?: +s. +|-(?P<month>\d?\d)-)(?P<year>(?:\d\d)?\d\d))s=(?:(?P<hour>\d\d):(?P<minute>\d\d)(?::(?P<second>\d\d))?(?: +s)?)s(?:s,? )? *s +tmonittueitweditthuitfriitsatitsunitjantfebtmartaprtmaytjuntjulitaugitsepi	tocti
tnovitdecitMontTuetWedtThutFritSattSuntJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDecc
Csθ||ƒ}	||	ƒ}
|
p
td‚n|
iƒ\}}}}}t|ƒdjot
i|ƒ}n
||ƒ}|o=||ƒ}yt|}WqΙtj
otd‚qΙXn
||ƒ}||ƒ}t
i
|||ƒS(sΡParseDate(arpastring)

       Returns a DateTime instance reflecting the given ARPA
       date. Only the date part is parsed, any time part will be
       ignored. The instance's time is set to 0:00:00.

    swrong formatiswrong month formatN(tstript
arpastringtstparse_arpadatetdatet
ValueErrortgroupstlitdaytdaytlitmonthtmonthtyeartlentDateTimetadd_centurytatoitlowert
litmonthtabletKeyError(
R'R)R&R5tatofR6R/R1R-R(R*R0R.((t4/usr/lib/python2.4/site-packages/mx/DateTime/ARPA.pyt	ParseDate1s$
c	Cs8||ƒ}||ƒ}|p
td‚n|iƒ\	}	}
}
}}}}}}t|ƒdjoti|ƒ}n
||ƒ}|
o=||
ƒ}
yt|
}WqΥtj
otd‚qΥXn
||ƒ}||
ƒ}
||ƒ}||ƒ}|djo
d}n
||ƒ}ti|||
|||ƒS(s€ParseDateTime(arpastring)

       Returns a DateTime instance reflecting the given ARPA date assuming
       it is local time (timezones are silently ignored).
    s wrong format or unkown time zoneiswrong month formatf0.0N(R&R'R(tparse_arpadatetimeR*R+R,R-R.R/R0R1thourtminutetsecondtzoneR2R3R4R5R6R7R8tNoneR9(R'R<R&R5R9R6R?R1R@R-R/R*R0R.R>R=R(((R:t
ParseDateTimeRs.	
'

c	CsK||ƒ}||ƒ}|p
td‚n|iƒ\	}	}}
}
}}}}}t|ƒdjoti|ƒ}n
||ƒ}|
o=||
ƒ}
yt|
}
WqΥtj
otd‚qΥXn
||
ƒ}
||ƒ}||ƒ}||ƒ}|djo
d}n
||ƒ}ti|ƒ}ti||
||||ƒ|S(s™ParseDateTimeGMT(arpastring)

       Returns a DateTime instance reflecting the given ARPA date converting
       it to UTC (timezones are honored).
    s wrong format or unkown time zoneiswrong month formatf0.0N(R&R'R(R<R*R+R,R-R.R/R0R1R=R>R?R@R2R3R4R5R6R7R8RAR9tTimezonet
utc_offsettoffset(R'R<R&R5R9R6R?R1R@R-R/RER*R0R.R>R=R(((R:tParseDateTimeGMTws0	
'

c
Csc|djo|iƒ}ndt|i|it|i|i	|i
|i|i|i
|if	S(s"str(datetime,tz=DateTime.tz_offset(datetime))

    Returns the datetime instance as ARPA date string. tz can be given
    as DateTimeDelta instance providing the time zone difference from
    datetime's zone to UTC. It defaults to
    DateTime.tz_offset(datetime) which assumes local time. s)%s, %02i %s %04i %02i:%02i:%02i %+03i%02iN(
ttzRAtdatetimet	gmtoffsett_daystday_of_weekR.t_monthsR0R1R=R>R?(RHRG((R:tstr s
cCs:dt|i|it|i|i|i|i|i	fS(sj strGMT(datetime)

    Returns the datetime instance as ARPA date string assuming it
    is given in GMT. s#%s, %02i %s %04i %02i:%02i:%02i GMTN(
RJRHRKR.RLR0R1R=R>R?(RH((R:tstrGMT±scCs:dt|i|it|i|i|i|i|i	fS(sj strUTC(datetime)

    Returns the datetime instance as ARPA date string assuming it
    is given in UTC. s#%s, %02i %s %04i %02i:%02i:%02i UTCN(
RJRHRKR.RLR0R1R=R>R?(RH((R:tstrUTC½sc
Cs5dk}dk}dk}|ii|iddƒ}t|dƒ}xθ|i	|ƒ}|pPndG|idƒGHdG|idƒGHd	G|i
d
ƒGH|i
dƒ}yt|ƒ}dGt|ƒGHWn6tj
o*}	d
Gt|ƒGdG|	GHtdƒnXHx'|iƒ}|d djoPqqWqIWdS(NtHOMEsnsmail/InboxtrisFrom:tfromsTo:ttosSubject:tsubjectR*sDate:s	PROBLEMS:s-->s...hit return to continueisFrom -(tsystostrfc822tpathtjointenvirontfiletopentftMessagetmtgetaddrtgetaddrlistt	getheadertrawtParseDateTimeUTCR*ROR+twhytreprt	raw_inputtreadlinetline(
R]RVRWR_RURcR[R*RiRe((R:t_testΙs0t__main__(#t__doc__R3RCtretstringt_litdayt	_litmontht_dateR@t_zonet_timet	_arpadatet
_arpadatetimetcompilet
arpadateREtarpadatetimeREtlitdaytableR7RJRARLtmatchR&R5R9R6R;RBRFRdRMRNRORjt__name__(R;RJRjR3RdRyRoRmR7RxRrRnRtRBRuRFRLRORNRqRpRsRwRMRC((R:t?
s2	Er-'!'%''			


Anon7 - 2021