Re: mktimestamp help

From: Date: Wed, 31 Dec 2008 01:50:21 +0000
Subject: Re: mktimestamp help
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-45845@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ron wrote: > Hi, > > I'm trying to do online subscription on my site. > > I need to determine the expirationdate of the subscription, given the > date today is the start of subscription and duration type of example 6 > months. > > $subscriptiondate = > > date("Y-m-d",mktime(0,0,0,date('m'),date('d'),date('Y'))); > > $expiredate = > date("Y-m-d",mktime(0,0,0,date('m'),date('d'),date('Y')) + > 2592000); the 2592000 timestamp for 1 month. > > how can i compute the timestamp for 6 months or maybe 1 year or more. > > Thank you > > Regards, > Ron > mktimestamp? is this a new kind of function? try strtotime*, then you will be able to 'compute' dates * http://es.php.net/manual/en/function.strtotime.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) iEYEARECAAYFAklaz90ACgkQcm5XIl6hZIhZvQCfQ+bvkuvsPYU9x4Fz503Drpdt Q8EAnjsCEufDqo86CzVZ7jLrDR1wyNCH =0FtA -----END PGP SIGNATURE-----

« previous php.db (#45845) next »