Is there a canonical approach, or is it something like: $dt->add( days => 1 )->truncate( to => 'day' )->subtract( seconds => 1 );
Here's the ugly part: The deal is I have a web form where start and end dates are entered, but in the database the column is a timestamp. Typically, the smallest interval is an entire day, but want to retain the ability to use a custom time within the day. So, instead of truncating in the database select (which would prevent using a custom start or end time of day) the plan is to truncate the DateTime objects before storing in the database. So, in this form, the smallest interval possible is one day, so if the same date is entered for both start and end then the interval is the entire day. Yes, a bit convoluted. -- Bill Moseley mose...@hank.org Sent from my iMutt