TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   bisixth year (http://www.talkphp.com/absolute-beginners/4907-bisixth-year.html)

pipesportugal 08-27-2009 08:31 PM

bisixth year
 
Hi everyone,

Can someone tell me if there is a php function that returns if a given year is a bisixth year or normal year ?

Thanks in advance,
pipesportugal

Village Idiot 08-27-2009 08:55 PM

What the heck is a bisixth year? The term does not show up on google or dictionary.com

pipesportugal 08-27-2009 08:58 PM

In reality I did just the same, I mean I translated the Portuguese word: bisexto to english at babelfish and that's what came back: bisixth.
It's the year when February has 29 days.
regards

Enfernikus 08-27-2009 09:01 PM

A leap year I think he's referring to.

Village Idiot 08-27-2009 09:20 PM

I figured it was lost in translation once I saw you were from Portugal, but I put it though bablefish....

This will tell you if its leap year (the year that has 366 days in it)
PHP Code:

function isLeapYear(int year)
{
    if(
year == 0)
    {
        return 
true;
    }
    else
    {
        return 
false;
    }


Basically what the code does is use the modulo operator to see if the year can be divided by four without any remainder. If it can be divided by four, its leap year.

pipesportugal 08-27-2009 10:44 PM

Thanks a lot guys.

pipesportugal


All times are GMT. The time now is 05:06 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0