Skip to content

implement GEDCOM7 tag DATE:PHRASE#5304

Open
BertKoor wants to merge 9 commits into
fisharebest:mainfrom
BertKoor:issue5171_datePhrase
Open

implement GEDCOM7 tag DATE:PHRASE#5304
BertKoor wants to merge 9 commits into
fisharebest:mainfrom
BertKoor:issue5171_datePhrase

Conversation

@BertKoor
Copy link
Copy Markdown
Contributor

fix #5171

I thought I already had a PR for this, but could not find it anymore.

BertKoor added 9 commits June 17, 2025 14:15
* definition of the tag as subtag of events (alas INDI:*:DATE does not work)
* checkmark on control panel to show/hide the subtag on edit forms

TODO:
* rendering on facts & events
* translation?
When it contains four digits, these get duplicated.
When date itself is absent, there are leading dashes. Maybe move these to .css?
…dcom5 datePhrase `2 DATE (xxx)`

Also don't render a hyphen when a date is absent but time is present.

Known issue: the new style date phrase will get rendered in the TimeLine chart, but not at other places you might expect it.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 0% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.18%. Comparing base (166f3e8) to head (ad445e3).

Files with missing lines Patch % Lines
app/Gedcom.php 0.00% 24 Missing ⚠️
app/Http/RequestHandlers/SiteTagsPage.php 0.00% 6 Missing ⚠️
app/Date.php 0.00% 5 Missing ⚠️
app/CustomTags/Gedcom7.php 0.00% 2 Missing ⚠️
app/Elements/DateValue.php 0.00% 2 Missing ⚠️
app/Http/RequestHandlers/SiteTagsAction.php 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5304      +/-   ##
============================================
- Coverage     35.20%   35.18%   -0.03%     
- Complexity    11236    11239       +3     
============================================
  Files          1159     1159              
  Lines         48108    48142      +34     
============================================
  Hits          16937    16937              
- Misses        31171    31205      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fisharebest
Copy link
Copy Markdown
Owner

There is an interesting line in the GEDCOM 5.5.1 specification (page 48), which I hadn't noticed before…

An acceptable alternative to the date phrase choice is to use one of the other choices such as
<DATE_APPROXIMATED> choice as the DATE line value and then include the date phrase value
as a NOTE value subordinate to the DATE line tag.

So it would appear that GEDCOM 5.5.1 allows a DATE:NOTE tag, which contains the date phrase!

/* GEDCOM 5.5.1 */
1 BIRT
2 DATE CAL 01 JAN 1900
3 NOTE Four days after the death of his brother
/* GEDCOM 7.0 */
1 BIRT
2 DATE CAL 01 JAN 1900
3 PHRASE Four days after the death of his brother

We should definitely add support for displaying DATE:PHRASE tags, just as we do for other custom tags and GEDCOM 7 tags.

But this conflicts with GEDCOM 5.5.1, and webtrees still advertises itself as "100% GEDCOM 5.5.1 compatible".

Perhaps we should create DATE:NOTE instead DATE:PHRASE?

@BertKoor
Copy link
Copy Markdown
Contributor Author

BertKoor commented Feb 6, 2026

No, this is explicitly GEDCOM7. The tag becomes only available in editing forms when selected in the Control Panel under GEDCOM7 things.

If you want/need DATE:NOTE, you know better than I what to do. But that does not allow only a phrase (so without an approximation)

@fisharebest
Copy link
Copy Markdown
Owner

Since the GEDCOM 5.5.1 spec says we can store date phrases in INDI:*:DATE:NOTE, I would probably implement this by adding support for inline notes here, with the label "Date phrase" to indicate that it is has a specific purpose and is not for general notes.

Then, if we add DATE:PHRASE, the user will have an edit form with two fields, both labelled as "Date phrase".

So, adding the g7 DATE:PHRASE would mean that we also need to remove the g5.5.1 DATE:NOTE.
We wouldn't want both at the same time.

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.

Support for GEDCOM7 tag DATE:PHRASE

2 participants