lilywong Posted April 18, 2006 Share Posted April 18, 2006 I have 4 text boxes to be filled with date (txtDate1, txtDate2, txtDate3, txtDate4), only txtDate1 need to be filled, the rest will be filled automatically by increment one based on txtDate1.however, is there any way to check whether the particular date is sunday ? if it is sunday, the date will be skipped and the following date is added.In this case for example,1/1/2006 (friday)2/1/2006 (saturday)3/1/2006 (sunday)4/1/2006 (monday)5/1/2006 (tuesday)so the 3/1/2006 will be skipped.so txtDate1 will be 1/1/2006, txtDate2 will be 2/1/2006 , txtDate3 will be 4/1/2006 , txtDate4 will be 5/1/2006 .thank you so much ! Link to comment https://forums.phpfreaks.com/topic/7693-date-conversion-problem/ Share on other sites More sharing options...
Roberto Posted April 18, 2006 Share Posted April 18, 2006 $dayNumber=date("w", mktime([int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] ))will give you a number from 0 to 6, with 0 being Sunday. You need to fill in some of the variables in mktime.Rob Link to comment https://forums.phpfreaks.com/topic/7693-date-conversion-problem/#findComment-28074 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.