Appendix A Date and time functions

by Andrew Makhorin <mao@mai2.rcnet.ru>
and Heinrich Schuchardt <heinrich.schuchardt@gmx.de>