Tweaks; plus extended ymd.c to convert dates from 1500 to 2299.