Dave Rolsky wrote:

Thinking about this more, I'm considering maybe just requiring that
multiplication be passed an integer, because if you do this:



What I'd like to do is simply find the midpoint, more or less, between two arbitrary datetimes. Off the cuff, knowing nothing about the internals (which I do, but I'm pretending not to) I'd think this:


 $mid = $dt1 + ($dt2 - $dt1)/2

to dwim.

However, as you say, things aren't really well defined the way durations are defined internally at the moment.

So the question becomes -- if the above is not the datetime idiom for finding a midpoint between two datetimes, then what is?

Thanks,
Matt



Reply via email to