What you need before you start
Review the exact fields, example values, validation rule, and effect of missing data before starting. Never accept an invented default for a required birth field.
Birth date
date required
Calculates the year, month, and day pillars and lunar conversion.
Example: 1990-06-15
Validation: Must be a valid Gregorian date no later than the current moment.
If missing: No pillar can be calculated.
Birth time (local clock)
time required
Calculates the day-boundary case and hour pillar from local clock time.
Example: 12:00
Validation: Must be precise to the minute; boundary cases need comparison.
If missing: A reviewable day and hour record cannot be produced.