taith Posted May 3, 2007 Share Posted May 3, 2007 i'm pretty sure this is mktime that does this... anybody know how to translate... say day/month into a date(z) type format? Quote Link to comment Share on other sites More sharing options...
Nameless12 Posted May 3, 2007 Share Posted May 3, 2007 i'm pretty sure this is mktime that does this... anybody know how to translate... say day/month into a date(z) type format? mktime() returns a timestamp based on the parameters, dates second parameter is a timestamp so the below should work just fine. date("d-m-Y", mkdate()); if you were referring to date(z) as in date('z') just do date("z", mkdate()) Quote Link to comment Share on other sites More sharing options...
taith Posted May 3, 2007 Author Share Posted May 3, 2007 yes... but that would return todays... i need to be able to return any day's date(z)... Quote Link to comment Share on other sites More sharing options...
akitchin Posted May 3, 2007 Share Posted May 3, 2007 if the date is in an english language format, you can use strtotime() which will return a timestamp that you can use with date(). otherwise, yes, mktime() does this using numerical values. see the manual for the parameters: http://ca3.php.net/manual/en/function.mktime.php Quote Link to comment Share on other sites More sharing options...
taith Posted May 3, 2007 Author Share Posted May 3, 2007 YAY! thanks guys... heres what i came up with function datez($day,$month,$year){ return date(z,mktime(0,0,0,$month,$day,$year)); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.