BAMPFA-79: Implement scalar date computation. Also some refactoring.
BAMPFA-79: Add support for . following a display date, and following mid.