Re: Future()

From: Date: Sun, 10 Sep 2000 15:12:49 +0000
Subject: Re: Future()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-32823@lists.php.net to get a copy of this message
At 12:31 PM 9/10/00 +0200, you wrote:
I wrote some function in php allowing this: printf("Today is: %s\n", Date("d/m/Y H:i", time())); printf("Tomorrow is: %s\n", Date("d/m/Y H:i", Future(time(), "1d"))); printf("Next week is: %s\n", Date("d/m/Y H:i", Future(time(),"1w"))); // also "1w2d4h2s" -> 1 week 2 days 4 hours 2 seconds I think it'd be nice to port to C, (I'm not sure wether PHP already has such a function) I don't have the time for it, if someone feels like it.. Lemme know if you wanna have the php version
We already have this. strtotime('+1 day'); strtotime('+1 week'); strtotime('+1 week 2 days 4 hours 2 seconds'); -Andrei

« previous php.dev (#32823) next »