|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
php date functions
Hello there!!!!!!!!!
I am trying to work with checking and calculation of dates using php. Do you know how can I check that a date that a user is entering is the correct?( i.e 31 of february is not a valid date...or to check the entered date against the current date?) Do you know also how can I calculate the number of days? For example when a user is selecting a start date and an end date, how can I calculate the number of days between them? (i.e february has 28 days, july 31 days etc.). I hope i dont ask too much Thanks a lot alex |
|
#2
|
|||
|
|||
|
Hi Alex,
http://www.php.net/date has explanations for everything you need to know. It's a great reference for the PHP DATE() function so I would recommend you check that out as your first point of support ![]() |
|
#3
|
|||
|
|||
|
You can make like that:
switch($x){ case "january": $days=31 break; case"february": etc. Sincerely, Sergey Booyny AlarIT programmer http://www.AlarIT.com |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > php date functions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|