X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=doc%2Finterface.html;h=34f8b073c214ec5f3f381ae9d9d356f0eec41723;hb=51285ba56b69a19c1a12269c76ee814102fa3256;hp=d41fe7ff9d1b781f7b19970aa077964e1f80021a;hpb=397773d57e7df450f2061f6471e8e37e8bd73fad;p=gedcom-parse.git
diff --git a/doc/interface.html b/doc/interface.html
index d41fe7f..34f8b07 100644
--- a/doc/interface.html
+++ b/doc/interface.html
@@ -1208,7 +1208,7 @@ XREF_PTR(SUBN)
ELT_SUB_SOUR, ELT_SUB_SOUR_TEXT
-
STRING
NULL
STRING
NULL
GEDCOM_STRING(val)
is always the s
DV_PHRASE
GEDCOM_STRING(val)
is always the s
date_value
struct and initializes it properly, or copies an existing date value:
+struct date_value* gedcom_new_date_value (const struct date_value* copy_from);
+
If the parameter copy_from
is NULL
, a new value is created and given initial values. If it is non-NULL
, the value is copied into a new date value.DATE_BOUNDED
.+ ++
To ensure that an updated date value is consistent, i.e. all
+its struct fields are consistent with each other, the following function
+can be used:int gedcom_normalize_date (Date_input compute_from, struct date_value* value);
+
+
The compute_from
parameter determines which fields
+will be taken as input to compute the other fields. The following table
+gives an overview of the input and output parameters (the calendar type cal
is always an input parameter, and should not be CAL_UNKNOWN
):compute_from + |
+ input parameters + |
+ output parameters + |
+
DI_FROM_STRINGS + |
+ day_str, month_str, year_str + |
+ day, month, year, year_type + |
+
DI_FROM_NUMBERS + |
+ day, month, year, year_type + |
+ day_str, month_str, year_str + |
+
DI_FROM_SDN + |
+ type, sdn1, sdn2 + |
+ day, month, year + |
+
DV_PHRASE
, no conversions take
+place, otherwise one or both of the date structs are processed according
+to the table above, depending on the type. The function returns 0 in case of success, non-zero in case of an error.+ +struct date_value* dv = gedcom_new_date_value(NULL);
;
+dv->date1.cal = CAL_GREGORIAN;
+dv->date1.day = 4
+dv->date1.month = 2;
+dv->date1.year = 1799;
+dv->date1.year_type = YEAR_SINGLE;
+gedcom_normalize_date(DI_FROM_NUMBERS, dv);
+
+dv->date1.cal = CAL_FRENCH_REV;
+gedcom_normalize_date(DI_FROM_SDN, dv);
+/* the day, month and year are now filled in according to the French Revolution calendar */
+
++ -
AGE_NO_MODIFIER
: no modifierAGE_LESS_THAN
: the modifier '<' is addedAGE_GREATER_THAN
: the modifier '>' is addedage_value
struct and initializes it properly, or copies an existing age value:
+struct age_value* gedcom_new_age_value (const struct age_value* copy_from);
+
+
If the parameter copy_from
is NULL
, a new value is created and given initial values. If it is non-NULL
, the value is copied into a new age value.