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
7b828a6a
Kaydet (Commit)
7b828a6a
authored
Agu 30, 2000
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
doc changes to parallel changes to calendar.py module
üst
ad3bc44d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
11 deletions
+46
-11
libcalendar.tex
Doc/lib/libcalendar.tex
+46
-11
No files found.
Doc/lib/libcalendar.tex
Dosyayı görüntüle @
7b828a6a
...
...
@@ -9,15 +9,35 @@
This module allows you to output calendars like the
\UNIX
{}
\program
{
cal
}
program, and provides additional useful functions
related to the calendar.
related to the calendar. By default, these calendars have Monday as
the first day of the week, and Sunday as the last (the European
convention). Use
\function
{
setfirstweekday()
}
to set the first day of the
week to Sunday (6) or to any other weekday.
\begin{funcdesc}
{
setfirstweekday
}{
weekday
}
Sets the weekday (
\code
{
0
}
is Monday,
\code
{
6
}
is Sunday) to start
each week. The values
\constant
{
MONDAY
}
,
\constant
{
TUESDAY
}
,
\constant
{
WEDNESDAY
}
,
\constant
{
THURSDAY
}
,
\constant
{
FRIDAY
}
,
\constant
{
SATURDAY
}
, and
\constant
{
SUNDAY
}
are provided for
convenience. For example, to set the first weekday to Sunday:
\begin{verbatim}
import calendar
calendar.setfirstweekday(calendar.SUNDAY)
\end{verbatim}
\end{funcdesc}
\begin{funcdesc}
{
firstweekday
}{}
Returns the current setting for the weekday to start each week.
\end{funcdesc}
\begin{funcdesc}
{
isleap
}{
year
}
Returns true if
\var
{
year
}
is a leap year.
\end{funcdesc}
\begin{funcdesc}
{
leapdays
}{
y
ear1, year
2
}
Return the number of leap years in the range
[
\var
{
y
ear1
}
\ldots\var
{
year
2
}
].
\begin{funcdesc}
{
leapdays
}{
y
1, y
2
}
Return
s
the number of leap years in the range
[
\var
{
y
1
}
\ldots\var
{
y
2
}
].
\end{funcdesc}
\begin{funcdesc}
{
weekday
}{
year, month, day
}
...
...
@@ -34,17 +54,32 @@ for the specified \var{year} and \var{month}.
\begin{funcdesc}
{
monthcalendar
}{
year, month
}
Returns a matrix representing a month's calendar. Each row represents
a week; days outside of the month a represented by zeros.
Each week begins with Monday unless set by
\function
{
setfirstweekday()
}
.
\end{funcdesc}
\begin{funcdesc}
{
prmonth
}{
theyear, themonth
\optional
{
, w
\optional
{
, l
}}}
Prints a month's calendar as returned by
\function
{
month()
}
.
\end{funcdesc}
\begin{funcdesc}
{
month
}{
theyear, themonth
\optional
{
, w
\optional
{
, l
}}}
Returns a month's calendar in a multi-line string. If
\var
{
w
}
is
provided, it specifies the width of the date columns, which are
centered. If
\var
{
l
}
is given, it specifies the number of lines that
each week will use. Depends on the first weekday as set by
\function
{
setfirstweekday()
}
.
\end{funcdesc}
\begin{funcdesc}
{
prmonth
}{
year, month
\optional
{
, width
\optional
{
, length
}}}
Prints a month's calendar. If
\var
{
width
}
is provided, it specifies
the width of the columns that the numbers are centered in. If
\var
{
length
}
is given, it specifies the number of lines that each
week will use.
\begin{funcdesc}
{
prcal
}{
year
\optional
{
, w
\optional
{
, l
\optional
{
c
}}}}
Prints the calendar for an entire year as returned by
\function
{
calendar()
}
.
\end{funcdesc}
\begin{funcdesc}
{
prcal
}{
year
}
Prints the calendar for the year
\var
{
year
}
.
\begin{funcdesc}
{
calendar
}{
year
\optional
{
, w
\optional
{
, l
\optional
{
c
}}}}
Returns a 3-column calendar for an entire year as a multi-line string.
Optional parameters
\var
{
w
}
,
\var
{
l
}
, and
\var
{
c
}
are for date column
width, lines per week, and number of spaces between month columns,
respectively. Depends on the first weekday as set by
\function
{
setfirstweekday()
}
.
\end{funcdesc}
\begin{funcdesc}
{
timegm
}{
tuple
}
...
...
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