date utils extracted from git