Description
Test query against issue and expiry with a caller-selected inclusive expiry endpoint; return started, ended and validUnderDates.
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.
Test query against issue and expiry with a caller-selected inclusive expiry endpoint; return started, ended and validUnderDates.
When to use this tool
Use Food Supplier Certificate Valid Window Check when you need a specified food-handling record or traceability diagnostic.
How to use the tool and how it works
- Enter issuedDay, expiresDay, queryDay, endInclusive. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read started, ended, validUnderDates. Inspect started, ended, validUnderDates before interpreting the associated values.
Require expiry no earlier than issue. Test query against issue and expiry with a caller-selected inclusive expiry endpoint; return started, ended and validUnderDates.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| issuedDay | Issued Day | Required. Safe integer. |
| expiresDay | Expires Day | Required. Safe integer. |
| queryDay | Query Day | Required. Safe integer. |
| endInclusive | End Inclusive | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| started | Started | Required. Boolean. |
| ended | Ended | Required. Boolean. |
| validUnderDates | Valid Under Dates | Required. Boolean. |
{
"input": {
"issuedDay": 10,
"expiresDay": 20,
"queryDay": 20,
"endInclusive": true
},
"output": {
"started": true,
"ended": false,
"validUnderDates": true
}
} Limitations and assumptions
- Dates are numeric day coordinates. Date validity does not authenticate a supplier certificate or establish its scope, legal validity or product safety.
- 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
Similar or alternative tools
- Food Inspection Record Expiry Gap
Add it to issuedDay, subtract queryDay for remaining time and flag expired only after expiry.
- Food Sample Parent Batch Identifier
Compare parents literally and serialize source, recorded parent and sample as a JSON-array provenance key.