[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: How to define an \<expire\> tag\?

On Mon, Jan 26, 1998 at 03:03:07PM +0100, Fritz Zaucker wrote:
> I guess the 395 should be replaced by 365???  Anyway, this breaks for
> leap-years. How about using Timelocal instead? The problem is that
> this is (funnily) not a standard perl module either. But as I have it,
> I guess I'll use it.

maybe I'm completly nuts, but why should this break for leap-years ?
you're comparing two dates created by the same mechanism. 
As long as your constants aren't too small it should work, so i think
if ( $ct[0]+100*$ct[1]*100*$ct[2] >= et[0]+100*$et[1]*1000*$et[2]){...
would do it, too.

rfc0896: This 4000% overhead is annoying, but tolerable on 
         lightly loaded networks.
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com