Contact

ISLEAPYEAR in Calligra Sheets: Check Leap Years Correctly

Date & Time Beginner Calligra Sheets

Test whether a calendar year is a leap year in Calligra Sheets, with a reproducible worksheet, century-year edge cases, and migration cautions.

Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked

Quick answer

ISLEAPYEAR checks a numeric calendar year—not a date or a date-formatted string—and returns a Boolean. =ISLEAPYEAR(2024) has an expected result of TRUE, whereas =ISLEAPYEAR(2025) has an expected result of FALSE. KDE’s function handbook documents one whole-number year argument and the release-pinned implementation calls Qt QDate::isLeapYear() on that integer. This is documentation and source confirmation, not observed native execution. [E1][E2][E3]

Use this function to determine February’s day count, create calendar checks, or classify year-end reporting periods. Leap year means February has 29 calendar days rather than 28; it is not the same as an ISO year containing 53 numbered weeks. [E1][E3][E5]

Exact syntax, argument order, types and defaults

=ISLEAPYEAR(year)
Position Argument Required KDE-documented type Meaning
1 year Yes Integer / whole number Calendar year to test, e.g., 2024.

The result is TRUE/FALSE, not a date or a February-day count. The handbook and release’s XML specify one parameter and no documented optional arguments or defaults. Calligra’s 26.08.2 function registry registers ISLEAPYEAR with the implementation func_isLeapYear, and an OpenOffice/ODF interoperability alternate name COM.SUN.STAR.SHEET.ADDIN.DATEFUNCTIONS.GETISLEAPYEAR. That dotted name is an alternate registration, not a separate function. [E1][E2][E3]

These examples use the English-language KDE handbook’s semicolon separator for formulas containing multiple arguments; the one-argument call has no separator. Regional decimal/argument conventions and dates typed directly into cells can vary with locale. Use the installed application’s function insertion dialog to confirm the local convention. No dependence on an ambiguous typed date occurs in the examples below. [E1][E7]

Reproducible worksheet: test eight calendar years

On a new, empty sheet, put Year in B1, Leap? in C1, and Days in year in D1. Enter the B-column values as whole numbers, not quoted text or date cells. Type =ISLEAPYEAR(B2) in C2 and =IF(C2;366;365) in D2; copy the two formulas down through row 9. Each expected value is computed independently using the Gregorian leap-year rule, and agrees with the pinned Qt call’s intended purpose; no result was captured from Calligra. [E1][E3][E5]

Row B: Calendar year Formula in C Expected C Formula in D Expected D
2 1900 =ISLEAPYEAR(B2) FALSE =IF(C2;366;365) 365
3 2000 =ISLEAPYEAR(B3) TRUE =IF(C3;366;365) 366
4 2004 =ISLEAPYEAR(B4) TRUE =IF(C4;366;365) 366
5 2023 =ISLEAPYEAR(B5) FALSE =IF(C5;366;365) 365
6 2024 =ISLEAPYEAR(B6) TRUE =IF(C6;366;365) 366
7 2025 =ISLEAPYEAR(B7) FALSE =IF(C7;366;365) 365
8 2100 =ISLEAPYEAR(B8) FALSE =IF(C8;366;365) 365
9 2400 =ISLEAPYEAR(B9) TRUE =IF(C9;366;365) 366

Independent calculation: A year divisible by 4 is a leap year unless divisible by 100; if also divisible by 400, it is a leap year after all. Thus 1900 and 2100 are not leap years, whereas 2000 and 2400 are. This is why testing only divisibility by 4 is insufficient. The helper IF is itself a documented Calligra function. Confirm formatting if a locale displays Boolean labels differently. [E1][E3][E5]

Advanced use: a February-specific control

For a fiscal/calendar template, add February days in E1 and place this formula in E2, then copy down:

=IF(ISLEAPYEAR(B2);29;28)

Its expected outputs for B2:B9 are 28, 29, 29, 28, 29, 28, 28, 29. This avoids converting ambiguous text dates such as 02/03/2024. For a separate warning label, use =IF(ISLEAPYEAR(B6);"Allow Feb 29";"Use Feb 28") (expected Allow Feb 29 for 2024). Nested IF expressions are separately documented by KDE; neither compound formula was executed in the application during this review. [E3][E5][E6]

Further independent check: Compare =ISLEAPYEAR(2024) (TRUE) with =WEEKSINYEAR(2024) (52): a leap year does not automatically have 53 ISO weeks. Do not substitute WEEKSINYEAR or ISOWEEKNUM for leap-year detection. [E3][E6]

Errors, limits and troubleshooting

  • Date-versus-year confusion: ISLEAPYEAR expects the year number. Do not blindly paste ISLEAPYEAR(A2) from an OpenOffice example if A2 contains a date serial; first extract the year where appropriate, such as =ISLEAPYEAR(YEAR(DATE(2024;2;1))). This nested example’s expected result is TRUE, using registered Calligra DATE and YEAR; date conversion and nesting were not natively tested here. [E2][E3][E6]
  • Years 1900, 2000 and 2100: Do not label every year divisible by 100 a leap year. The 400-year exception explains the different results above. [E3][E5]
  • Quoted text, blanks, decimals and out-of-range years: The source converts its first argument with asInteger() and then calls QDate::isLeapYear(). Coercion and error propagation for such inputs were not tested natively; do not assert a specific error token or automatic rounding. Use validated positive whole-number years. [E3]
  • Function name missing or formula entered as text: Confirm the exact ISLEAPYEAR spelling, initial equals sign and availability in the installed Calligra package; the 26.08.2 source registration is not proof of every platform/package. [E1][E2][E4]
  • A Boolean displays strangely: Check cell format, locale and recalculation. A numeric 0 is not proof that the Calligra function returns an integer; its documented return type is Boolean. [E1][E3]

Evidence-based compatibility notes

Calligra Sheets 26.08.2: Official ISLEAPYEAR(year) accepts a year integer and returns TRUE/FALSE. KDE source confirms the alternate dotted registration name and Qt implementation; native application output has not been observed. [E1][E2][E3]

Apache OpenOffice Calc: Apache’s official function reference uses ISLEAPYEAR(date)—a date argument, not Calligra’s whole-number year. Its documentation says the Analysis AddIn is required in that edition, and describes a 1/0 return. Consequently =ISLEAPYEAR(2024) must not be copied unaltered between these programs with an expectation of identical interpretation. [E6]

Microsoft Excel: Apache’s official compatibility notes say the direct ISLEAPYEAR function is unavailable in Excel. Use a separate calendar-rule formula when migrating, and test it. Microsoft also documents Excel’s historical 1900 leap-year date-system exception; it does not change the mathematical result that 1900 was not a leap year. Do not use Excel’s February 1900 serial dates as independent validation of Calligra’s ISLEAPYEAR(1900). [E5][E6]

Validation: Official documentation and pinned source reviewed; example values independently calculated. Native Calligra execution was not performed.