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
3b818bfb
Kaydet (Commit)
3b818bfb
authored
Haz 05, 2010
tarafından
Alexander Belopolsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #8899: time.struct_time now has class and atribute docstrings.
üst
f2c25c5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
time.rst
Doc/library/time.rst
+9
-8
NEWS
Misc/NEWS
+2
-0
timemodule.c
Modules/timemodule.c
+16
-10
No files found.
Doc/library/time.rst
Dosyayı görüntüle @
3b818bfb
...
@@ -87,25 +87,26 @@ An explanation of some terminology and conventions is in order.
...
@@ -87,25 +87,26 @@ An explanation of some terminology and conventions is in order.
+=======+===================+=================================+
+=======+===================+=================================+
| 0 | :attr:`tm_year` | (for example, 1993) |
| 0 | :attr:`tm_year` | (for example, 1993) |
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 1 | :attr:`tm_mon` | range [1,
12]
|
| 1 | :attr:`tm_mon` | range [1,
12]
|
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 2 | :attr:`tm_mday` | range [1,
31]
|
| 2 | :attr:`tm_mday` | range [1,
31]
|
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 3 | :attr:`tm_hour` | range [0,
23]
|
| 3 | :attr:`tm_hour` | range [0,
23]
|
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 4 | :attr:`tm_min` | range [0,
59]
|
| 4 | :attr:`tm_min` | range [0,
59]
|
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 5 | :attr:`tm_sec` | range [0,
61]; see **(1)** in
|
| 5 | :attr:`tm_sec` | range [0,
61]; see **(1)** in
|
| | | :func:`strftime` description |
| | | :func:`strftime` description |
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 6 | :attr:`tm_wday` | range [0,
6], Monday is 0
|
| 6 | :attr:`tm_wday` | range [0,
6], Monday is 0
|
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 7 | :attr:`tm_yday` | range [1,
366]
|
| 7 | :attr:`tm_yday` | range [1,
366]
|
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
| 8 | :attr:`tm_isdst` | 0, 1 or -1; see below |
| 8 | :attr:`tm_isdst` | 0, 1 or -1; see below |
+-------+-------------------+---------------------------------+
+-------+-------------------+---------------------------------+
Note that unlike the C structure, the month value is a range of 1-12, not 0-11.
Note that unlike the C structure, the month value is a range of [1, 12],
not [0, 11].
A year value will be handled as described under "Year 2000 (Y2K) issues" above.
A year value will be handled as described under "Year 2000 (Y2K) issues" above.
A ``-1`` argument as the daylight savings flag, passed to :func:`mktime` will
A ``-1`` argument as the daylight savings flag, passed to :func:`mktime` will
usually result in the correct daylight savings state to be filled in.
usually result in the correct daylight savings state to be filled in.
...
...
Misc/NEWS
Dosyayı görüntüle @
3b818bfb
...
@@ -52,6 +52,8 @@ C-API
...
@@ -52,6 +52,8 @@ C-API
Library
Library
-------
-------
- Issue #8899: time.struct_time now has class and atribute docstrings.
- Issue #4487: email now accepts as charset aliases all codec aliases
- Issue #4487: email now accepts as charset aliases all codec aliases
accepted by the codecs module.
accepted by the codecs module.
...
...
Modules/timemodule.c
Dosyayı görüntüle @
3b818bfb
...
@@ -216,21 +216,27 @@ Delay execution for a given number of seconds. The argument may be\n\
...
@@ -216,21 +216,27 @@ Delay execution for a given number of seconds. The argument may be\n\
a floating point number for subsecond precision."
);
a floating point number for subsecond precision."
);
static
PyStructSequence_Field
struct_time_type_fields
[]
=
{
static
PyStructSequence_Field
struct_time_type_fields
[]
=
{
{
"tm_year"
,
NULL
},
{
"tm_year"
,
"year, for example, 1993"
},
{
"tm_mon"
,
NULL
},
{
"tm_mon"
,
"month of year, range [1, 12]"
},
{
"tm_mday"
,
NULL
},
{
"tm_mday"
,
"day of month, range [1, 31]"
},
{
"tm_hour"
,
NULL
},
{
"tm_hour"
,
"hours, range [0, 23]"
},
{
"tm_min"
,
NULL
},
{
"tm_min"
,
"minutes, range [0, 59]"
},
{
"tm_sec"
,
NULL
},
{
"tm_sec"
,
"seconds, range [0, 61])"
},
{
"tm_wday"
,
NULL
},
{
"tm_wday"
,
"day of week, range [0, 6], Monday is 0"
},
{
"tm_yday"
,
NULL
},
{
"tm_yday"
,
"day of year, range [1, 366]"
},
{
"tm_isdst"
,
NULL
},
{
"tm_isdst"
,
"1 if summer time is in effect, 0 if not, and -1 if unknown"
},
{
0
}
{
0
}
};
};
static
PyStructSequence_Desc
struct_time_type_desc
=
{
static
PyStructSequence_Desc
struct_time_type_desc
=
{
"time.struct_time"
,
"time.struct_time"
,
NULL
,
"The time value as returned by gmtime(), localtime(), and strptime(), and
\n
"
" accepted by asctime(), mktime() and strftime(). May be considered as a
\n
"
" sequence of 9 integers.
\n\n
"
" Note that several fields' values are not the same as those defined by
\n
"
" the C language standard for struct tm. For example, the value of the
\n
"
" field tm_year is the actual year, not year - 1900. See individual
\n
"
" fields' descriptions for details."
,
struct_time_type_fields
,
struct_time_type_fields
,
9
,
9
,
};
};
...
...
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