Re: using getDate on an arbitrary date

From: Date: Mon, 27 Jan 2020 06:13:36 +0000
Subject: Re: using getDate on an arbitrary date
References: 1 2 3  Groups: php.general php.general 
Request: Send a blank email to php-general+get-326989@lists.php.net to get a copy of this message
Thank you for the response. It looks like I can use this JK. > On Jan 26, 2020, at 9:11 PM, Stefan A. <acid24@gmail.com> wrote: > > Probably what you want is something like: > > <?php > $time = mktime(0, 0, 0, $month, $day, $year); > if (false !== $time && -1 !== $time) { > $info = getdate($time); > } else { > // error > } > > https://www.php.net/manual/en/function.mktime.php > > On Mon, Jan 27, 2020 at 5:50 AM Jeffry Killen <jekillen@prodigy.net> wrote: > Hello; > What I am looking for is a way to pass a date > month/day/year to getDate and find out the > various array values associated with that date. > > So the question is: how would I convert int mon/ int day/ int year > to a time stamp? Looking at the various functions it is not > clear to me. > > Thank you for time and attention; > JK

« previous php.general (#326989) next »