added midnight function
midnight function default to today