moved month2int and timecomponents2days to lib