Jigowatt

Change the first day on our PHP Event Calendar Script

Posted by Jay on Thursday, October 15th, 2009 at 9:40 am

Just a quick post for any of our ThemeForest customers who’ve purchased our PHP Event Calendar Script and would like to change the first day of the week to Sunday.

If you want Sunday to be the first day enter this code

1
2
3
4
5
6
$firstday = date("w",mktime(0, 0, 0, $month, 1, $year));
if ($firstday != 0){
    for($y=$firstday; $y> 0; $y--) {
    echo "<div class='cal_day' style='background:none;'></div>";
    }
}

before this line

1
for($i=1; $i<= $day_count; $i++) { // Start of for $i

in the function list_events in the functions.php file.

Thanks to swamp_under on ThemeForest for posting this fix!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Design Float
  • email
  • StumbleUpon
  • Twitthis

Related posts:

2 Responses to “Change the first day on our PHP Event Calendar Script”

  1. Carlos says:

    I purchased this script from Code Canyon and I think it is a great script, but I would like to have the calendar start on a Sunday. I looked for the code “for($i=1; $i<= $day_count; $i++) { // Start of for $i" in functions.php, but to no avail.

    Am I missing something?

  2. Carlos says:

    Also…how might I go about assigning an alternate BG color to the days with events?

Leave a Reply