At 10:42 am +0000 2004-02-11, Mark Fowler wrote:
On Tue, 10 Feb 2004, Matt Sisk wrote:

 I understand why you have to deal with the ambiguity, but I still really
 wish there were an easer way to get a rough shot at this value when
 absolute precision is not required.

The problem is I'd like to be able to get the number of seconds a duration represents when it's not an abstract duration, i.e. when the length of all the days was originally known.


Mark, I posted this earlier but it hasn't shown up.

DateTime::Format::Duration has normalisation functions:

use DateTime::Format::Duration qw/strfduration/;
print strfduration(
        pattern  => '%s',
        base     => $london_pm_social,
        duration => $london_pm_social - $now
);

That will return how many seconds it is until the london pm social on march 4th.

Cheers!
Rick Measham


-- -------------------------------------------------------- There are 10 kinds of people: those that understand binary, and those that don't. -------------------------------------------------------- The day Microsoft makes something that doesn't suck is the day they start selling vacuum cleaners -------------------------------------------------------- "Write a wise proverb and your name will live forever." -- Anonymous --------------------------------------------------------

Reply via email to