On Wednesday, July 24, 2002, at 09:05 , Ian Zapczynski wrote: [..] > What I'd *like* to do is stringify the output from both of these > functions, as they both return objects. Is this possible? If I do > something like: > > ($year,$month,$day) = Today(); > $yesterday = Add_Delta_Days($year,$month,$day, -1); > > $cal = Date::Calendar->new( $Profiles->{'US'} ); > ($prev_business_day,$rest) = $cal->add_delta_workdays($year,$month,$day, > -1); > > I can print out the contents of $yesterday and $prev_business_day and > seemingly get stringified output, but if I try to do something like: > > if ($yesterday ne $prev_business_day) { > .... > } > > I get "Date::Calc::_not_equal_date_time_(): can't compare a date and a > delta vector at test.pl" >
A strategy you may want to play is to use the Data::Dumper and see if you can 'dig into' the "object" a bit... to find what they really 'share' in common that you can compare with. Your basic 'strategy' seems reasonable - since if you can get to the 'julian date' then you can have your numerical compare... eg: [jeeves:~] drieux% cal -j July 2002 S M Tu W Th F S 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 [jeeves:~] drieux% for some strange reason - people talk about the 'string' july 4th rather than 185 + $leapyear The problem of course is that this year for some Julian Day 186 was a 'banking holiday' and/or 'half day' for others it was just another 'Hawaiian T-shirt Friday'.... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]