Implement full CHANGE_DATE structure support#15
Merged
AdamIsrael merged 1 commit intomainfrom Dec 8, 2025
Merged
Conversation
…E fields Add complete GEDCOM 5.5.1 CHANGE_DATE structure support across all record types. Previously, CHANGE_DATE was either partially implemented (only capturing DATE) or completely skipped (SourceRecord and NoteRecord). This commit implements full support including DATE, TIME, and NOTE fields as specified in GEDCOM 5.5.1. Changes: - Add new ChangeDate struct with date, time, and notes fields - Update all 7 record types to use ChangeDate instead of Option<String>: * Individual records * Family records * Submitter records * Repository records * Multimedia records * Source records (previously skipping CHAN entirely) * Note records (previously skipping CHAN entirely) - Add comprehensive test coverage for all CHANGE_DATE features - Update ROADMAP.md to reflect full CHANGE_DATE support Breaking change: change_date field type changed from Option<String> to Option<ChangeDate> across all record types. This is acceptable as there are no users yet. All 266 tests passing. No clippy warnings.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements complete GEDCOM 5.5.1 CHANGE_DATE structure support across all record types by introducing a dedicated ChangeDate struct that captures DATE, TIME, and NOTE fields. Previously, some records only stored the DATE value as a string, while SourceRecord and NoteRecord skipped CHANGE_DATE parsing entirely.
Key Changes:
- Created new
ChangeDatestruct with comprehensive parsing logic and 11 unit tests - Updated all 7 GEDCOM record types to use
Option<ChangeDate>instead ofOption<String> - Enhanced documentation to reflect full CHANGE_DATE support
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/change_date.rs | New file implementing ChangeDate struct with parser supporting DATE, TIME, and NOTE fields |
| src/types/mod.rs | Added ChangeDate module and export |
| src/types/submitter.rs | Replaced manual CHAN parsing with ChangeDate::parse call and updated tests |
| src/types/source_record.rs | Replaced CHAN skip logic with ChangeDate::parse and updated field type |
| src/types/repository_record.rs | Replaced basic DATE extraction with full ChangeDate::parse |
| src/types/note_record.rs | Replaced CHAN skip logic with ChangeDate::parse |
| src/types/multimedia_record.rs | Replaced basic DATE extraction with full ChangeDate::parse |
| src/types/individual/individual.rs | Replaced manual CHAN parsing with ChangeDate::parse and added test for NOTE field |
| src/types/family.rs | Replaced basic DATE extraction with full ChangeDate::parse and added test for NOTE field |
| src/main.rs | Updated integration tests to work with new ChangeDate struct |
| docs/ROADMAP.md | Updated CHANGE_DATE status from "basic parsing" to "full support" across all record types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements complete GEDCOM 5.5.1 CHANGE_DATE structure support across all record types, including DATE, TIME, and NOTE fields.
Motivation
Previously, CHANGE_DATE implementation was inconsistent:
This PR brings full GEDCOM 5.5.1 compliance for change tracking metadata.
Changes
New Type
ChangeDatestruct withdate,time, andnotesfieldsUpdated Record Types
All 7 GEDCOM record types now use
Option<ChangeDate>:Testing
Documentation
Breaking Changes
change_datefield type changed fromOption<String>toOption<ChangeDate>across all record types.This is acceptable as confirmed with the maintainer - there are no users yet.
Verification
cargo clippy -- -D warnings)cargo fmt)Example
Before:
After:
CHANGE_DATE Structure Now Captures:
n CHAN +1 DATE <value> ✅ Captured +2 TIME <value> ✅ Captured (was discarded) +1 NOTE <value> ✅ Captured (was discarded)