note 93239 added to function.jdtojewish

From: Date: Sat, 29 Aug 2009 22:28:55 +0000
Subject: note 93239 added to function.jdtojewish
Groups: php.notes 
Request: Send a blank email to php-notes+get-160038@lists.php.net to get a copy of this message
Sometimes it is useful to have the date in the format YYYY-MM-DD, which is sortable (e.g. you can sort dates by sorting the strings): function JDToSortableJewish($jd) { return preg_replace("|(\d+)/(\d+)/(\d+)|","$3-$1-$2", // year-month-day preg_replace("|/(\d)/|","/0$1/", // add zeros to the day preg_replace("|^(\d)/|","0$1/", // add zeros to the month JDToJewish($jd)))); } ---- Server IP: 69.147.83.197 Probable Submitter: 93.172.246.109 ---- Manual Page -- http://www.php.net/manual/en/function.jdtojewish.php Edit -- https://master.php.net/note/edit/93239 Del: integrated -- https://master.php.net/note/delete/93239/integrated Del: useless -- https://master.php.net/note/delete/93239/useless Del: bad code -- https://master.php.net/note/delete/93239/bad+code Del: spam -- https://master.php.net/note/delete/93239/spam Del: non-english -- https://master.php.net/note/delete/93239/non-english Del: in docs -- https://master.php.net/note/delete/93239/in+docs Del: other reasons-- https://master.php.net/note/delete/93239 Reject -- https://master.php.net/note/reject/93239 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160038) next »