Skip to content

Main content

Food Inspection Record Expiry Gap Tool

Inclusive final day under an explicitly supplied record-validity convention.

Loading tool…

Description

Add it to issuedDay, subtract queryDay for remaining time and flag expired only after expiry.

Food-safety records connect lots, samples, tests, labels and handling events. Consistent identifiers and reconciled quantities support record review, but do not establish safe food, complete traceability or valid regulatory approval.

Add it to issuedDay, subtract queryDay for remaining time and flag expired only after expiry.

When to use this tool

Use Food Inspection Record Expiry Gap when you need a specified food-handling record or traceability diagnostic.

How to use the tool and how it works

  1. Enter issuedDay, validityDays, queryDay. 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 expiryDay, remainingDays, expired. Inspect expired before interpreting the associated values.

Require nonnegative integer validityDays. Add it to issuedDay, subtract queryDay for remaining time and flag expired only after expiry.1

Input fieldMeaning and unitsAccepted input
issuedDayIssued DayRequired. Safe integer.
validityDaysValidity DaysRequired. Safe integer; minimum 0.
queryDayQuery DayRequired. Safe integer.
Output fieldInterpretationReturned shape
expiryDayExpiry DayRequired. Safe integer.
remainingDaysRemaining DaysRequired. Safe integer.
expiredExpiredRequired. Boolean.
json
{
  "input": {
    "issuedDay": 100,
    "validityDays": 30,
    "queryDay": 120
  },
  "output": {
    "expiryDay": 130,
    "remainingDays": 10,
    "expired": false
  }
}

Limitations and assumptions

  • Expiry equality is accepted. This arithmetic does not authenticate an inspection or establish legally valid approval, acceptable conditions or safe food.
  • 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

Review the complete controlled records, actual product condition and applicable validated procedures. Authenticate sources and approvals rather than treating one matching token or balance as a safety verdict.

References

  1. Calculation and input contract: food-safety/food-inspection-record-expiry-gap — tool.io

Similar or alternative tools