Fapturbo

Www Savings2ndmortgage Tag Amp Savings 2nd Mortgage PHP: getdate - Manual

Www Savings2ndmortgage Tag Amp Savings 2nd Mortgage

)) {}

search& Www b Amp psearch&searchb Www p&search asearch Tag ssearchasearchcsearch searchS Amp vsearchn Amp ssearchnsearchmor Savings2ndmortgage gsearch Tag w Amp Amp T Tag g Tag Savings2ndmortgage sarh Tag Www w Www e wsearchesearchrc Amp searchs Savings2ndmortgage S Tag v Www nsearchs Www n Tag m Www rsearchg Savings2ndmortgage g Tag Amp cs Savings2ndmortgage avi Savings2ndmortgage g Savings2ndmortgage 2 Www dortsearchasearche Www a Amp A Savings2ndmortgage p Savings2ndmortgage
$GMdateParts;
}
?>
chris AT cmbuckley DOT co DOT uk 08-Aug-2008 07:08
For those who want the gmgetdate function that matches the behaviour of getdate:

<?php
function gmgetdate($timestamp = null) {}

   
$dateParts = array(
       
'mday'    => 'j',
       
'wday'    => 'w',
       
'yday'    => 'z',
       
'mon'     => 'n',
       
'year'    => 'Y',
       
'hours'   => 'G',
       
'minutes' => 'i',
       
'seconds' => 's',
       
'weekday' => 'l',
       
'month'   => 'F',
       
0         => 'U'
   
);

    while (list(,
$value) = each($dateParts)) {}
    }

    return
$dateParts;
}
?>
timforte at gmail dot com 10-Jan-2008 08:07
It's worth noting that this is local time, not UTC/GMT - gmgetdate doesn't exist :(.

The most logical way to handle date arithmetic without hitting DST problems is to work in UTC...

<?php
function add_days($my_date,$numdays) {}
?>

[it's even faster if you use gmmktime instead of strtotime]
andre at anlex dot co dot za 13-Dec-2006 04:38
I thought best to show a posseble way to go about bypassing the end month issue where the first day in a new month will have the monday of the week that it falls in - in the old month. Use the numbering of days as the constant and work you way from there.

Example:
<?php
//-----------------------------
$now = time();
$num = date("w");
if (
$num == 0)
{}
else {}
$WeekMon  = mktime(0, 0, 0, date("m", $now)  , date("d", $now)-$sub, date("Y", $now));    //monday week begin calculation
$todayh = getdate($WeekMon); //monday week begin reconvert

$d = $todayh[mday];
$m = $todayh[mon];
$y = $todayh[year];
echo
"$d-$m-$y"; //getdate converted day

?>

Allot less code makes everyone happy..
Jared Armstrong 09-Dec-2006 10:05
A nice little function I wrote to determine what number occurrence weekday it is of the month for a given timestamp. (I.e. 2nd Friday, or the 3rd Thursday)

Eg: print_r(getWeekdayOccurrence(mktime(0, 0, 0, 12, 1, 2006)));
Outputs: Array ( [0] => 1 [1] => Friday )  [The first friday]

Eg. print_r(getWeekdayOccurrence(mktime(0, 0, 0, 8, 17, 2009)));
Outputs: Array ( [0] => 3 [1] => Monday ) [The third Monday]

<?php
function getWeekdayOccurrence($time) {}

   
$posd  = array_search(date("l", $time), $days);
   
$posdm = array_search($days[0], $days) - $posd; /

    return array(((
$day+$posdm+6)/7), $days[$posd]);       
}
?>
cesar at nixar dot org 22-Oct-2006 08:49
<?php

 
/**
   *  This function is similar to getdate() but it returns
   * the month information.
   *
   *  Returns an associative array containing the month
   * information of the parameters, or the current month
   * if no parameters are given.
   *
   */

 
function getmonth ($month = null, $year = null)
  {}

 
// Output
 
print_r(getmonth(11, 1978));
 
print_r(getmonth());

?>
Cas_AT_NUY_DOT_INFO 04-Mar-2006 05:47
<?php
// This functions calculates the next date only using business days
// 2 parameters, the startdate and the number of businessdays to add
   
function calcduedate($datecalc,$duedays) {}
       
$i++;
    }
    return
$datecalc ;
    }
?>
leo25in at yahoo dot com 11-May-2005 05:17
getting weekday(actual date) from any give date.

<?php
function cal_date($wday,$tstamp)
{}

function
getweekday($m,$d,$y)
{}
   
   
    
$w["day"]=date("d",$wstamp);
    
$w["month"]=date("m",$wstamp);
    
$w["year"]=date("Y",$wstamp);
    
     return
$w;

}
?>
getisomonday($year, $week) 21-Apr-2004 02:58
getdate does not convert week numbers. this function relies on strftime to find a timestamp that falls on the monday of specified year and ISO week:

<?php function getisomonday($year, $week) {} ?>
Yura Pylypenko (plyrvt at mail dot ru) 15-Sep-2003 06:29
In addition to canby23 at ms19 post:
It's a very bad idea to consider day having 24 hours (86400 secs), because some days have 23, some - 25 hours due to daylight saving changes. Using of mkdate() and strtotime() is always preferred. strtotime() also has a very nice behaviour of datetime manipulations:
<?php
echo strtotime ("+1 day"), "\n";
echo
strtotime ("+1 week"), "\n";
echo
strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n";
echo
strtotime ("next Thursday"), "\n";
echo
strtotime ("last Monday"), "\n";
?>
dWww Savings2ndmortgage Tag Amp Savings 2nd Mortgage PHP: getdate - Manualn Savings 2nd Mortgage Investment rWww Savings2ndmortgage Tag Amp Savings 2nd Mortgage PHP: getdate - Manuall y y Savings Savings 2nd Mortgage Mortgage