Top "Leap-year" questions

A leap year is a year containing one additional day, which falls on Feb 29 in the Gregorian calendar.

Java Code for calculating Leap Year

I am following "The Art and Science of Java" book and it shows how to calculate a leap year. The …

java leap-year acm-java-libraries
Leap year calculation

In order to find leap years, why must the year be indivisible by 100 and divisible by 400? I understand why it …

algorithm calendar leap-year
Java calculate days in year, or between two dates

Is there a method in any native Java class to calculate how many days were/will be in a specific …

java calendar leap-year
Javascript: calculate number of days in month for a given year

I have a HTML page with 3 dropdowns for the month, day and year and I was wondering if there was …

javascript date datepicker drop-down-menu leap-year
How to find leap year programmatically in C

I wrote a program in C to find whether the entered year is a leap year or not. But unfortunately …

c leap-year
PHP: Adding years to a timestamp

In PHP given a UTC timestamp I would like to add exactly N number of years. This should take into …

php date time timestamp leap-year
Using regex to match date format in yyyymmdd

The regex should match valid dates in a string in the format YYYYMMDD. For example, aaa_20150327_bbb should be matched …

regex date nsregularexpression leap-year
javascript to find leap year

How can I get the code below to work when I have a month of february? Currently it is getting …

javascript date textfield leap-year
How to determine the date one day prior to a given date in Java?

I am assuming Java has some built-in way to do this. Given a date, how can I determine the date …

java date leap-year
Find the last day of the year

I am doing a task in which it is required to find the last day of the year by given …

c# datetime leap-year