date.py: code improvements

- remove obsolete types import
- PEP8 changes

Change-Id: Ib9c9679e5d1b9d499912ff6c11ee785bb52a076a