is_leap_year {fastymd} | R Documentation |
Is value a leap year?
Description
Determine whether an input value is a leap year using the branchless approach of jerichaux (2025). Method provided for both Dates and numeric values. Numeric values first floored before the calculation is made.
Usage
is_leap_year(x)
is_leap(x)
Arguments
x |
An R object. |
Value
logical
result.
References
jerichaux. (2025) How to find leap year programmatically in C. Available at: https://stackoverflow.com/a/79564914 (Accessed 16 April 2025).
[Package fastymd version 0.1.3 Index]