+2003-02-05 Peter Verthez <Peter.Verthez@advalvas.be>
+
+ * gedcom/date.c (gedcom_parse_date): Keep parsed values in date if
+ parse was OK, but didn't result in a valid date.
+
2003-02-02 Peter Verthez <Peter.Verthez@advalvas.be>
* release 0.90.0
NOTE: NO BACKWARD COMPATIBILITY IS GUARANTEED FOR 0.x RELEASES !!
+release 0.91.0 (NOT RELEASED YET):
+
+ - If a date is parsed fine, but cannot be successfully converted to an
+ SDN, the parsed values are now kept in the returned date_value. This means
+ that a date of DV_PHRASE type can have meaningful values in the string
+ and number values (the sdn value will still be -1).
+
release 0.90.0 (2 February 2003):
- The interface of libgedcom and libgedcom_gom should now be functionally
<tr>
<td valign="top"><code>DV_PHRASE</code><br>
</td>
- <td valign="top">a free form date phrase<br>
+ <td valign="top">a free form date phrase
+(date1 and date2 can contain meaningful values, if the dates could be parsed,
+but did not result in a valid date; the sdn values will then still be -1)<br>
</td>
<td valign="top">phrase<br>
</td>
<br>
<br>
<br>
+<br>
</body></html>
\ No newline at end of file
- no FAMC field in SLGC
- uses tab character (will be converted to 8 spaces here)
- lines too long
+ - non-standard date formats
- Personal Ancestral File 2:
- '@' not written as '@@' in values
- COMM tag in submitter record
- double dates written as e.g. '1815/1816' instead of '1815/16'
+ - non-standard date formats
- Family Origins:
- '@' not written as '@@' in values
- '@' not written as '@@' in values
- SUBM.CTRY instead of SUBM.ADDR.CTRY
- lines too long
+ - non-standard date formats
*/
int compat_matrix[] =
/* C_SUBM_CTRY */ C_PAF4,
/* C_NOTE_TOO_LONG */ C_PAF4 | C_PAF5,
/* C_NOTE_CONC_SOUR */ C_EASYTREE,
- /* C_NONSTD_SOUR_TAGS */ C_EASYTREE
+ /* C_NONSTD_SOUR_TAGS */ C_EASYTREE,
+ /* C_PAF_DATES */ C_PAF2 | C_PAF4 | C_PAF5
};
union _COMPAT_STATE {
C_NOTE_TOO_LONG,
C_NOTE_CONC_SOUR,
C_NONSTD_SOUR_TAGS,
+ C_PAF_DATES,
C_NR_OF_RULES
} Compat_rule;
struct date_value gedcom_parse_date(const char* line_value)
{
int result = 0;
+ init_date(&dv_s.date1);
+ init_date(&dv_s.date2);
init_date(&date_s);
init_date(&def_date);
curr_line_value = line_value;
}
if (result != 0) {
gedcom_date_error(_("Putting date in 'phrase' member"));
- make_date_value(DV_PHRASE, &def_date, &def_date, curr_line_value);
+ make_date_value(DV_PHRASE, &dv_s.date1, &dv_s.date2, curr_line_value);
}
return dv_s;
}
raw value: 29 FEB 1739
type: 11
date1:
- calendar type: 4
- day:
- month:
- year:
- date type: 0
+ calendar type: 0
+ day: 29
+ month: FEB
+ year: 1739
+ date type: 1
sdn1: -1
sdn2: -1
date2:
raw value: 29 FEB 1739
type: 11
date1:
- calendar type: 4
- day:
- month:
- year:
- date type: 0
+ calendar type: 0
+ day: 29
+ month: FEB
+ year: 1739
+ date type: 1
sdn1: -1
sdn2: -1
date2:
raw value: 29 FEB 1739
type: 11
date1:
- calendar type: 4
- day:
- month:
- year:
- date type: 0
+ calendar type: 0
+ day: 29
+ month: FEB
+ year: 1739
+ date type: 1
sdn1: -1
sdn2: -1
date2:
raw value: 29 FEB 1739
type: 11
date1:
- calendar type: 4
- day:
- month:
- year:
- date type: 0
+ calendar type: 0
+ day: 29
+ month: FEB
+ year: 1739
+ date type: 1
sdn1: -1
sdn2: -1
date2:
Date:
type: 11
date1:
- calendar type: 4
- day: '', -1
- month: '', -1
- year: '', -1
+ calendar type: 0
+ day: '29', 29
+ month: 'FEB', 2
+ year: '1739', 1739
year type: 0
- date type: 0
+ date type: 1
sdn1: -1
sdn2: -1
date2: