note 87071 added to function.mktime

From: Date: Tue, 18 Nov 2008 15:52:32 +0000
Subject: note 87071 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-146651@lists.php.net to get a copy of this message
Do remember that, counter-intuitively enough, the arguments for month and day are inversed (or middle-endian). A common mistake for Europeans seems to be to feed the date arguments in the expected order (big endian or little endian). It's clear to see where this weird order comes from (even with the date being big endian the order for all arguments would still be mixed - it's obviously based on the American date format with the time "prefixed" to allow an easier shorthand) and why this wasn't changed (passing the values in the wrong order produces a valid, though unexpected, result in most cases), but it continues to be a source of confusion for me whenever I come back to PHP from other languages or libraries. ---- Server IP: 212.124.37.9 Probable Submitter: 134.95.158.250 ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- https://master.php.net/note/edit/87071 Del: integrated -- https://master.php.net/note/delete/87071/integrated Del: useless -- https://master.php.net/note/delete/87071/useless Del: bad code -- https://master.php.net/note/delete/87071/bad+code Del: spam -- https://master.php.net/note/delete/87071/spam Del: non-english -- https://master.php.net/note/delete/87071/non-english Del: in docs -- https://master.php.net/note/delete/87071/in+docs Del: other reasons-- https://master.php.net/note/delete/87071 Reject -- https://master.php.net/note/reject/87071 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#146651) next »