/* Get the date from given NMEA RMC sentence.  */
static int process_rmc_date(struct nmea_sentence_rmc_t *rmc_p, struct date_t *date_p)
/* Get the date from given NMEA RMC sentence.  */
static int process_rmc_date(struct nmea_sentence_rmc_t *rmc_p, struct date_t *date_p)
{
    int res;
    res = nmea_decode_fix_time(rmc_p->time_of_fix_p,
                               &date_p->hour,
                               &date_p->minute,
                               &date_p->second);
    if (res != 0) {
        return (res);
    }
    date_p->day = -1;
    res = nmea_decode_date(rmc_p->date_p,
                           &date_p->year,
                           &date_p->month,
                           &date_p->date);
    if (res != 0) {
        return (res);
    }
    return (0);
}