Jump to content

[SOLVED] Leap Year on a Calendar


gerkintrigg

Recommended Posts

I'm curious what's going on with my calendar script.

 

It's displaying the fact that February is a leap year next year, but then going on to the first of the following month. - See for yourself at:

http://www.tichbornes.co.uk/availability_check.php

 

If you want code, I can let you have it, but there's quite a lot of it and I don't know where to begin.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/62814-solved-leap-year-on-a-calendar/
Share on other sites

It's impossible to tell what's going on if you don't provide any code.. and the link you point to is an infinite table which nicely crashes my browser!

 

A quick look at the manual shows that there is a function to tel if it's a leap year:

(date("L",{timestamp of any date in year you want to check})) == 1) ?

which might be a good place to start.

Yeah, i think we are going to need to see some code. You have other issues too - according to your calender, the 1st of August(today) is a sunday. Also, there is a missing day between each end and start of the month. On your calender, August finishes on a monday, and September starts on a wednesday.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.