MDL-59388 calendar: Add a helper to convert ymd to timestamp