function convertFormatToDayjs(format) {
  return format
  // Year conversion.
    .replace(/y/g, 'Y')
    // Day in month.
    .replace(/d/g, 'D')
    // Day in week.
    .replace(/E/g, 'd')
    // AM/PM marker
    .replace(/a/g, 'A')
    // Unix Timestamp
    .replace(/U/g, 'X');
}
Convert the format from the angular-datepicker module to moment format.
@param {string} format - The format to convert.
@returns {string} - The converted format.