Skip to content

Conversation

@geostag
Copy link
Contributor

@geostag geostag commented Jan 30, 2023

Allow incomplete Dates (without day or month), especially in DatePeriods. Issue #2

stdtag = f'{ucletter}({tagchar})*'
month = f'({stdtag}|{exttag})'
dateperiodstart = f'FROM'
dateperiodend = f'TO'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two lines above don't need to be f-strings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. While looking a bit deeper into the GEDCOM specification I wonder, if this point was already addressed partly by defining dateRestrict, which is not used anywhere in the rest of the specification. Thus it would be:

dateRestrict = '(FROM|TO|BET|AND|BEF|AFT|ABT|CAL|EST|BCE)"
month = f'(?!{dateRestrict})({stdtag}|{exttag})'

I submitted the question to gedcom-L, the german mailing list for GEDCOM specification. I suggest to wait for the reaction.

@geostag
Copy link
Contributor Author

geostag commented Feb 26, 2023

update: adjust daterestrict to reflect recent change in GEDCOM7
From my point of view final PR to properly handle daterestrict.

@DavidMStraub
Copy link
Owner

Thanks, perfect!

@DavidMStraub DavidMStraub merged commit 4caa6fe into DavidMStraub:main Feb 26, 2023
@geostag geostag deleted the alberogen branch June 28, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants