<!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 <collinw@gmail.com> wrote:<BR>
> > On the subject of datetime enhancements, I came<BR>
> > across an SF patch (#1673403) the other day that<BR>
> > proposed making it possible to compare date and<BR>
> > datetime objects.<BR>
><BR>
> One solution that just occurred to me -- and that<BR>
> skirts the issue of choosing an interpretation --<BR>
> is that, when comparing date and datetime objects,<BR>
> the datetime's .date() method is called and the<BR>
> result of that call is compared to the original<BR>
> date. That is,<BR>
><BR>
> datetime_obj < date_obj<BR>
><BR>
> is implicitly equivalent to<BR>
><BR>
> datetime_obj.date() < date_obj<BR>
><BR>
> 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>