add java api for date