Initial import of date(1)
Code cleanup