You should be able to do everything with PHP's date functions: http://www.php.net/manual/en/ref.datetime.php
Pay particular attention to the mktime, date, and getdate functions. The script below might be helpful to you. <? function begin_month($timestamp) { $a = getdate($timestamp); return mktime(0, 0, 0, $a["mon"], 1, $a["year"]); } function end_month($timestamp) { $a = getdate($timestamp); return mktime(0, 0, 0, $a["mon"] + 1, 0, $a["year"]); } function weekday($timestamp) { $a = getdate($timestamp); return $a["wday"]; } $date = mktime(0, 0, 0, 12, 15, 2001); echo date("M/d/Y", begin_month($date)), "\n"; echo date("M/d/Y", end_month($date)), "\n"; echo weekday($date), "\n"; ?> __________ Curt A. Gilman Richmond, Virginia, USA [EMAIL PROTECTED] "Mrbaseball34" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > PHP Newbie, so please don't flame me <bg>! > > I am converting an organizer example from an ASP book to PHP > and need some help. > > Need some help with the following code : > > /* > intMonth and intYear are variables passed into a function > datCurrent, intCurrentMonthDays and intWorkDays are local > variables > */ > > datCurrent = CDate(intMonth & "/1/" & intYear) > intCurrentMonthDays = _ > Day(DateAdd("d", -1, DateAdd("m", 1, datCurrent))) > intWeekday = Weekday(datCurrent) > > I can't find any PHP functions to handle this type of day/date > manipulation... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]