Welcome Guest, Not a member yet? Register   Sign In
add dates
#5

[eluser]xwero[/eluser]
[quote author="chinedubond" date="1228143866"]Thanks for ur elp but i got a solution

$expiryDate= date("d-m-Y",mktime(0, 0, 0, date("d",$date), date("m",$date), date("Y",$date)+1));[/quote]
If your date is a unix timestamp just do
Code:
// constants.php
define('YEAR_IN_SECONDS',31556926);
// somewhere in your code
$expiryDate= date("d-m-Y",$date+YEAR_IN_SECONDS);
unix timestamps are just numbers so date calculations should be calculations instead of function calls.


Messages In This Thread
add dates - by El Forum - 12-01-2008, 02:10 AM
add dates - by El Forum - 12-01-2008, 02:36 AM
add dates - by El Forum - 12-01-2008, 03:04 AM
add dates - by El Forum - 12-01-2008, 03:28 AM
add dates - by El Forum - 12-01-2008, 03:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB