Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
843e712b
Kaydet (Commit)
843e712b
authored
Ara 06, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added descriptions of parsedate(), parsedate_tz(), getdate_tz()
(all contributed by Andrew Kuchling).
üst
61ed4db9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
librfc822.tex
Doc/lib/librfc822.tex
+28
-0
librfc822.tex
Doc/librfc822.tex
+28
-0
No files found.
Doc/lib/librfc822.tex
Dosyayı görüntüle @
843e712b
...
...
@@ -21,6 +21,25 @@ All header matching is done independent of upper or lower case;
e.g.
\code
{
m['From']
}
,
\code
{
m['from']
}
and
\code
{
m['FROM']
}
all yield
the same result.
\begin{funcdesc}
{
parsedate
}{
date
}
Attempts to parse a date according to the rules in RFC822. however,
some mailers don't follow that format as specified, so
\code
{
parsedate()
}
tries to guess correctly in such cases.
\var
{
date
}
is a string containing an RFC822 date, such as
\code
{
"Mon, 20 Nov 1995 19:12:08 -0500"
}
. If it succeeds in parsing
the date,
\code
{
parsedate()
}
returns a 9-tuple that can be passed
directly to
\code
{
time.mktime()
}
; otherwise
\code
{
None
}
will be
returned.
\end{funcdesc}
\begin{funcdesc}
{
parsedate
_
tz
}{
date
}
Performs the same function as
\code
{
parsedate
}
, but returns either
\code
{
None
}
or a 10-tuple; the first 9 elements make up a tuple that
can be passed directly to
\code
{
time.mktime()
}
, and the tenth is the
offset of the date's time zone from UTC (which is the official term
for Greenwich Mean Time).
\end{funcdesc}
\subsection
{
Message Objects
}
A
\code
{
Message
}
instance has the following methods:
...
...
@@ -93,6 +112,15 @@ collection of email from many sources, it is still possible that this
function may occasionally yield an incorrect result.
\end{funcdesc}
\begin{funcdesc}
{
getdate
_
tz
}{
name
}
Retrieve a header using
\code
{
getheader
}
and parse it into a 10-tuple;
the first 9 elements will make a tuple compatible with
\code
{
time.mktime()
}
, and the 10th is a number giving the offset of
the date's time zone from UTC. Similarly to
\code
{
getdate()
}
, if
there is no header matching
\var
{
name
}
, or it is unparsable, return
\code
{
None
}
.
\end{funcdesc}
\code
{
Message
}
instances also support a read-only mapping interface.
In particular:
\code
{
m[name]
}
is the same as
\code
{
m.getheader(name)
}
;
and
\code
{
len(m)
}
,
\code
{
m.has
_
key(name)
}
,
\code
{
m.keys()
}
,
...
...
Doc/librfc822.tex
Dosyayı görüntüle @
843e712b
...
...
@@ -21,6 +21,25 @@ All header matching is done independent of upper or lower case;
e.g.
\code
{
m['From']
}
,
\code
{
m['from']
}
and
\code
{
m['FROM']
}
all yield
the same result.
\begin{funcdesc}
{
parsedate
}{
date
}
Attempts to parse a date according to the rules in RFC822. however,
some mailers don't follow that format as specified, so
\code
{
parsedate()
}
tries to guess correctly in such cases.
\var
{
date
}
is a string containing an RFC822 date, such as
\code
{
"Mon, 20 Nov 1995 19:12:08 -0500"
}
. If it succeeds in parsing
the date,
\code
{
parsedate()
}
returns a 9-tuple that can be passed
directly to
\code
{
time.mktime()
}
; otherwise
\code
{
None
}
will be
returned.
\end{funcdesc}
\begin{funcdesc}
{
parsedate
_
tz
}{
date
}
Performs the same function as
\code
{
parsedate
}
, but returns either
\code
{
None
}
or a 10-tuple; the first 9 elements make up a tuple that
can be passed directly to
\code
{
time.mktime()
}
, and the tenth is the
offset of the date's time zone from UTC (which is the official term
for Greenwich Mean Time).
\end{funcdesc}
\subsection
{
Message Objects
}
A
\code
{
Message
}
instance has the following methods:
...
...
@@ -93,6 +112,15 @@ collection of email from many sources, it is still possible that this
function may occasionally yield an incorrect result.
\end{funcdesc}
\begin{funcdesc}
{
getdate
_
tz
}{
name
}
Retrieve a header using
\code
{
getheader
}
and parse it into a 10-tuple;
the first 9 elements will make a tuple compatible with
\code
{
time.mktime()
}
, and the 10th is a number giving the offset of
the date's time zone from UTC. Similarly to
\code
{
getdate()
}
, if
there is no header matching
\var
{
name
}
, or it is unparsable, return
\code
{
None
}
.
\end{funcdesc}
\code
{
Message
}
instances also support a read-only mapping interface.
In particular:
\code
{
m[name]
}
is the same as
\code
{
m.getheader(name)
}
;
and
\code
{
len(m)
}
,
\code
{
m.has
_
key(name)
}
,
\code
{
m.keys()
}
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment