moving date functions into separate subpackage