Skip to content

Main content

Calendar Anniversary February Policy Flag Tool

Compute calendar anniversary february policy flag from explicit bounded inputs.

Loading tool…

Description

Map an anniversary to a supplied year under a February-29 policy.

Civil calendar arithmetic needs explicit year numbering, leap rules and index origins. A weekday mask or Gregorian component operation does not identify a timezone, working calendar or historical calendar reform.

Map an anniversary to a supplied year under a February-29 policy.

When to use this tool

Use Calendar Anniversary February Policy Flag when checking the stated weekday or Gregorian calendar convention.

How to use the tool and how it works

  1. Enter sourceDate, targetYear, policy. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read date, adjusted. Inspect adjusted before interpreting the associated values.

Map an anniversary to a supplied year under a February-29 policy. Validate sourceDate, targetYear 1-9999 and policy february28 or march1; adjust only a February 29 anniversary in a nonleap target year.1

Input fieldMeaning and unitsAccepted input
sourceDateSource DateRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
targetYearTarget YearRequired. Safe integer; minimum 1; maximum 9999.
policyPolicyRequired. Text; one of "february28", "march1"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
dateDateRequired. Text; maximum UTF-16 length 8192.
adjustedAdjustedRequired. Boolean.
json
{
  "input": {
    "sourceDate": "2024-02-29",
    "targetYear": 2025,
    "policy": "february28"
  },
  "output": {
    "date": "2025-02-28",
    "adjusted": true
  }
}

Limitations and assumptions

  • The policy is supplied, not a legal birthday or anniversary rule.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use an appropriate full calendar library and authoritative local rules when business days, historical dates or real scheduling matter.

References

  1. Calculation and input contract: date/calendar-anniversary-february-policy-flag — tool.io

Similar or alternative tools