FIELD NOTES · ACCEPTANCE EXERCISES

Keep a requested delivery date from becoming the previous day

A requested calendar date is not automatically a moment in time. When a florist asks which day flowers should arrive, preserve that date as a date-only value until a separate delivery-time decision is made. Converting it through a server timezone can silently change the intended day.

Who should use this acceptance brief

Florists, hire firms and date-based enquiry websites. Use this as a scoped commissioning task for a website supplier. Where system evidence is required, a teaching file is not a substitute.

Source-bound platform fact

A date input normalises its value to yyyy-mm-dd even when its visible display is localised. Client constraints do not replace server validation. MDN: date inputs · Checked 16 October 2026.

Filled teaching example

Synthetic example, not a client case. Inputs, expected decisions and counterexamples follow; no live platform integration is claimed.

On narrow screens, scroll to read the complete table.

Input / caseCheck basisExpected decision
2026-10-18date-onlykeep 2026-10-18
2026-02-30invalid calendar datereject
18/10/2026display, not canonical payloadask for normalised value

Run the acceptance exercise

  1. Specify whether the field means a calendar date or a timed appointment.
  2. Validate format and the real calendar day on the server without silently rolling invalid dates forward.
  3. Round-trip the stored value through the customer view and staff export using the same test case.

Interpret the result and retain evidence

The supplied validator rejects 30 February rather than accepting JavaScript rollover. Its result preserves the input day. If the business later adds a cutoff or time slot, specify the location timezone separately. That new rule needs its own tests rather than changing the meaning of a date-only database field.

Limits before implementation

This is not a DST appointment resolver, holiday calendar or delivery guarantee. Allowed dates and lead times remain the business owner’s policy.

Replay the finite example

Save both files in one folder and run with Node22.13 or newer. These finite checks are not a live service or certification. Filled inputs and expected outputs · Inspectable functions

node decision-check.mjs date-only-enquiry-storage.json