<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: [Python-Dev] datetime module enhancements</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>On 3/9/07, Collin Winter &lt;collinw@gmail.com&gt; wrote:<BR>
&gt; &gt; On the subject of datetime enhancements, I came<BR>
&gt; &gt; across an SF patch (#1673403) the other day that<BR>
&gt; &gt; proposed making it possible to compare date and<BR>
&gt; &gt; datetime objects.<BR>
&gt;<BR>
&gt; One solution that just occurred to me -- and that<BR>
&gt; skirts the issue of choosing an interpretation --<BR>
&gt; is that, when comparing date and datetime objects,<BR>
&gt; the datetime's .date() method is called and the<BR>
&gt; result of that call is compared to the original<BR>
&gt; date. That is,<BR>
&gt;<BR>
&gt; datetime_obj &lt; date_obj<BR>
&gt;<BR>
&gt; is implicitly equivalent to<BR>
&gt;<BR>
&gt; datetime_obj.date() &lt; date_obj<BR>
&gt;<BR>
&gt; Seems a ready-made use case for that method.<BR>
<BR>
+1<BR>
<BR>
...and it's a decision that can be made independently<BR>
of how to add or subtract dates.<BR>
<BR>
<BR>
Robert Brewer<BR>
System Architect<BR>
Amor Ministries<BR>
fumanchu@amor.org</FONT>
</P>

</BODY>
</HTML>