Skip to content

Main content

Relative Date Anchor Literal Formatter Tool

Compute relative date anchor literal formatter from explicit bounded inputs.

Loading tool…

Description

Format a validated date anchor plus a signed day-offset literal.

Date labels and intervals depend on origins, endpoint inclusion and calendar versus elapsed-time conventions. Numeric serial periods and local token formats can represent useful bookkeeping without resolving a real instant or official fiscal rule.

Format a validated date anchor plus a signed day-offset literal.

When to use this tool

Use Relative Date Anchor Literal Formatter when checking a supplied date-label, duration or interval convention.

How to use the tool and how it works

  1. Enter anchor, offset. 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 literal. Use the output convention below.

Format a validated date anchor plus a signed day-offset literal. Require a real YYYY-MM-DD and whole offset in [-1000000,1000000]; append explicit plus for nonnegative offset and D suffix.1

Input fieldMeaning and unitsAccepted input
anchorAnchorRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
offsetOffsetRequired. Safe integer; minimum -1000000; maximum 1000000.
Output fieldInterpretationReturned shape
literalLiteralRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "anchor": "2024-01-01",
    "offset": 3
  },
  "output": {
    "literal": "2024-01-01+3D"
  }
}

Limitations and assumptions

  • No date arithmetic is performed; the literal is a local notation, not universally accepted ISO syntax.
  • 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 a complete date/time implementation and the applicable calendar policy for actual scheduling and interval interpretation.

References

  1. Calculation and input contract: date/relative-date-anchor-literal-formatter — tool.io

Similar or alternative tools