-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I have two users in my database whose birth date is set to:
1985-01-26
And then i have function which when provided the users' date, tells how many days are left in the birthday. Here is the function:
function retage($iy,$im,$id)
{
if(!empty($iy)>0 && intval($im)>0 &&…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying the following command in PHP 5.2.12 :
print (date('Y-m-d', strtotime('2009-12 last day')));
Regarding to the php.net manual :
date('m/d/y', strtotime('2009-03 last day')); # 03/31/09
it should display the last day of march 2009 (2009-03-31) !
Mine returns the last day of the previous…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've been using PHP's strtotime() method to accept a date field on a form. I love how powerful it is, in how it will accept "Tomorrow", "Next Thursday", or (supposedly) any date representation and convert it to the Unix timestamp.
It's been working great -- until yesterday. Someone entered "2-4-10"…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
There was always a strange bug in Joomla when adding new article with back-end displayed with a language other than English (for me it's Russian). The field "Finish Publishing" started to be current date instead of "Never" equivalent in Russian.
For a site in php4 finally found that strtotime function…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
For the first run, I need to use dates that are six months prior to the last MySQL date $row_recent[0]. For all of the runs after 1, I am using a previous variable to store the previous date and then decrease the date by 6 months. I have confirmed that the first if test produces the expected result…
>>> More