Complete the parse date and trim content function