diff --git a/README.md b/README.md index 69bfac4..bc67bb3 100644 --- a/README.md +++ b/README.md @@ -598,10 +598,10 @@ from dateutil.tz import UTC, tzlocal, gettz, datetime_exists, resolve_imaginary ### Constructors ```python - = date(year, month, day) - = time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0) -
= datetime(year, month, day, hour=0, minute=0, second=0, ...) - = timedelta(weeks=0, days=0, hours=0, minutes=0, seconds=0, ...) + = date(year, month, day) # Only accepts valid dates from 1 to 9999 AD. + = time(hour=0, minute=0, second=0) # Also: `microsecond=0, tzinfo=None, fold=0`. +
= datetime(year, month, day, hour=0) # Also: `minute=0, second=0, microsecond=0, …`. + = timedelta(weeks=0, days=0, hours=0) # Also: `minutes=0, seconds=0, microsecond=0`. ``` * **Use `'.weekday()'` to get the day of the week as an int, with Monday being 0.** * **`'fold=1'` means the second pass in case of time jumping back for one hour.** @@ -637,7 +637,7 @@ from dateutil.tz import UTC, tzlocal, gettz, datetime_exists, resolve_imaginary ### Decode ```python - = .isoformat(sep='T') # Also timespec='auto/hours/minutes/seconds/…'. + = .isoformat(sep='T') # Also: `timespec='auto/hours/minutes/seconds/…'`. = .strftime('') # Custom string representation. = .toordinal() # Days since Gregorian NYE 1, ignoring time and tz. = .timestamp() # Seconds since the Epoch, from DTn in local tz. @@ -2788,11 +2788,11 @@ from PIL import ImageDraw ```python .point((x, y)) # Truncates floats into ints. -.line((x1, y1, x2, y2 [, ...])) # To get anti-aliasing use images's resize(). +.line((x1, y1, x2, y2 [, ...])) # To get anti-aliasing use Image's resize(). .arc((x1, y1, x2, y2), deg1, deg2) # Always draws in clockwise direction. -.rectangle((x1, y1, x2, y2)) # To rotate use image's rotate() and paste(). -.polygon((x1, y1, x2, y2, ...)) # Last and first point get connected. -.ellipse((x1, y1, x2, y2)) # To rotate use image's rotate() and paste(). +.rectangle((x1, y1, x2, y2)) # To rotate use Image's rotate() and paste(). +.polygon((x1, y1, x2, y2, ...)) # Last point gets connected to the first. +.ellipse((x1, y1, x2, y2)) # To rotate use Image's rotate() and paste(). ``` * **Use `'fill='` to set the primary color.** * **Use `'width='` to set the width of lines or contours.** diff --git a/index.html b/index.html index c95e521..2416324 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -528,10 +528,10 @@ Point(x=1, y=2 -

Constructors

<D>  = date(year, month, day)
-<T>  = time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0)
-<DT> = datetime(year, month, day, hour=0, minute=0, second=0, ...)
-<TD> = timedelta(weeks=0, days=0, hours=0, minutes=0, seconds=0, ...)
+

Constructors

<D>  = date(year, month, day)               # Only accepts valid dates from 1 to 9999 AD.
+<T>  = time(hour=0, minute=0, second=0)     # Also: `microsecond=0, tzinfo=None, fold=0`.
+<DT> = datetime(year, month, day, hour=0)   # Also: `minute=0, second=0, microsecond=0, …`.
+<TD> = timedelta(weeks=0, days=0, hours=0)  # Also: `minutes=0, seconds=0, microsecond=0`.
 
    @@ -565,7 +565,7 @@ Point(x=1, y=2
  • ISO strings come in following forms: 'YYYY-MM-DD', 'HH:MM:SS.mmmuuu[±HH:MM]', or both separated by an arbitrary character. All parts following hours are optional.
  • Python uses the Unix Epoch: '1970-01-01 00:00 UTC', '1970-01-01 01:00 CET', …
-

Decode

<str>    = <D/T/DT>.isoformat(sep='T')      # Also timespec='auto/hours/minutes/seconds/…'.
+

Decode

<str>    = <D/T/DT>.isoformat(sep='T')      # Also: `timespec='auto/hours/minutes/seconds/…'`.
 <str>    = <D/T/DT>.strftime('<format>')    # Custom string representation.
 <int>    = <D/DT>.toordinal()               # Days since Gregorian NYE 1, ignoring time and tz.
 <float>  = <DTn>.timestamp()                # Seconds since the Epoch, from DTn in local tz.
@@ -2274,11 +2274,11 @@ img.convert('RGB').save(<ImageDraw>.point((x, y))                       # Truncates floats into ints.
-<ImageDraw>.line((x1, y1, x2, y2 [, ...]))      # To get anti-aliasing use images's resize().
+<ImageDraw>.line((x1, y1, x2, y2 [, ...]))      # To get anti-aliasing use Image's resize().
 <ImageDraw>.arc((x1, y1, x2, y2), deg1, deg2)   # Always draws in clockwise direction.
-<ImageDraw>.rectangle((x1, y1, x2, y2))         # To rotate use image's rotate() and paste().
-<ImageDraw>.polygon((x1, y1, x2, y2, ...))      # Last and first point get connected.
-<ImageDraw>.ellipse((x1, y1, x2, y2))           # To rotate use image's rotate() and paste().
+<ImageDraw>.rectangle((x1, y1, x2, y2))         # To rotate use Image's rotate() and paste().
+<ImageDraw>.polygon((x1, y1, x2, y2, ...))      # Last point gets connected to the first.
+<ImageDraw>.ellipse((x1, y1, x2, y2))           # To rotate use Image's rotate() and paste().
 
  • Use 'fill=<color>' to set the primary color.
  • @@ -2905,7 +2905,7 @@ $ pyinstaller script.py --add-data '<path>:.'