Add functions date & date_str to periods.