Commit 7a4df510 authored by 's avatar

Fixed docs in regard to exceptions raised by the constructor.

parent ba40732f
...@@ -210,8 +210,10 @@ ...@@ -210,8 +210,10 @@
</ul> </ul>
<p> In all cases, invalid date, time, or timezone components will <p>
raise a DateTimeError. </p> If a string argument passed to the DateTime constructor cannot be
parsed, it will raise DateTime.SyntaxError. Invalid date, time, or
timezone components will raise a DateTime.DateTimeError. </p>
<p> The module function Timezones() will return a list of the <p> The module function Timezones() will return a list of the
timezones recognized by the DateTime module. Recognition of timezones recognized by the DateTime module. Recognition of
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Encapsulation of date/time values""" """Encapsulation of date/time values"""
__version__='$Revision: 1.18 $'[11:-2] __version__='$Revision: 1.19 $'[11:-2]
import sys,os,regex,DateTimeZone import sys,os,regex,DateTimeZone
...@@ -423,8 +423,9 @@ class DateTime: ...@@ -423,8 +423,9 @@ class DateTime:
effect of this is as if you had taken the value of time.time() effect of this is as if you had taken the value of time.time()
at that time on a machine in the specified timezone). at that time on a machine in the specified timezone).
In all cases, invalid date, time, or timezone components will If a string argument passed to the DateTime constructor cannot be
raise a DateTimeError. parsed, it will raise DateTime.SyntaxError. Invalid date, time, or
timezone components will raise a DateTime.DateTimeError.
The module function Timezones() will return a list of the The module function Timezones() will return a list of the
timezones recognized by the DateTime module. Recognition of timezones recognized by the DateTime module. Recognition of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment