FDateTime::IsLeapYear

Checks whether the given year is a leap year.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/DateTime.h

Include

#include "Misc/DateTime.h"

Source

/Engine/Source/Runtime/Core/Private/Misc/DateTime.cpp

Syntax

static bool IsLeapYear
(
    int32 Year
)

Remarks

Checks whether the given year is a leap year.

A leap year is a year containing one additional day in order to keep the calendar synchronized with the astronomical year. All years divisible by 4, but not divisible by 100 - except if they are also divisible by 400 - are leap years.

Returns

true if the year is a leap year, false otherwise.

Parameters

Parameter

Description

Year

The year to check.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss