Coding & developmentDate testingcode

Test date logic at the boundaries that break it

Generates cases for timezone, daylight and period-edge behaviour.

Editorial illustration for Test date logic at the boundaries that break it
Editorial illustration for this prompt; the prompt itself does not generate this image.

Ready to use

Prompt

Given [DATE FUNCTION], [BUSINESS TIMEZONE] and [EXPECTED RULE], build a test matrix for midnight, month end, leap day, daylight transition where applicable, missing timezone and ambiguous local time. State exact inputs and expected outputs only when the rule defines them; mark gaps for the owner. Provide test code in [LANGUAGE] and a short explanation of each case. Do not assume server timezone equals business timezone. Check that tests use fixed clocks and that formatting and arithmetic are verified separately.