If you don't have mcal, and need a replacement, here is an even easier way:
<?php
$utime = mktime (1,1,1,$month,$day,$year);
$weekday=date('w',$utime); // 0 for Sunday through 6 for Saturday, just like mcal_day_of_week
?>
![]() | mcal_day_of_weekDescriptionint mcal_day_of_week ( int year, int month, int day )mcal_day_of_week() returns the day of the week of the given date. Possible return values range from 0 for Sunday through 6 for Saturday. ![]()
ssimon at latinschool dot org
05-Aug-2003 11:29
If you don't have mcal, and need a replacement, here is an even easier way:
mail at azov dot info
30-Jul-2003 08:17
I did it much easier (without "mcal" library):
cigalcohol at yahoo dot com
11-Aug-2002 05:35
I don't have the MCAL lib, so I wrote a script that will return the day of the week for any date 2000+ using Zeller's Rule:
dagjo at stud dot ntnu dot no
04-Jun-2001 02:57
It is quite straightforward... Here's an example:
| ![]() |