Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 31 million developers.Sign up
Warning: SiblingsBornTooClose (#239) If siblings were born less than 9 months apart.
Warning: ChildBornBeforeParent (#238) When the child is born before either parent.
Warning: Unparsable date (#237) Warnings are a way to surface data that may be wrong for a variety of reasons. Some examples may be that dates cannot be understood, children are born before parents, nodes to adhere to GEDCOM standards, etc. Nodes can now implement a Warner interface which returns a slice of Warning entities. Document also implements Warner to aggregate all warnings. This patch starts with a single type of warning, when dates cannot be parsed. More kinds of warnings will be added in time.
Date: Subtract dates into a Duration (#236) A new Duration type with whole-day resolution and pretty formatting is ideal when dealing with durations from subtracting dates.
Date: add ParseError (#235) When parsing a date based on a string the error will be placed in ParseError.
Refactoring DateNode to DateRange (#234) Most of the date range functionality was in the DateNode which means it could not be used in other places we need to represent date ranges. There is now a DateRange type where most of these methods have been moved to. Also, more comprehensive comparisons can be made like Before, After and range comparison constants.
SexNode: replaces Sex (#233) Qualified SexNode to represent gender. It has all the same functionality as the existing Sex type, but better reflects the node it represents. Also added some more helpful methods like IsMale, IsFemale, IsUnknown and OwnershipWord.
Vastly improved API (#232) This is the biggest refactoring in a long time. This address several issues with the API that have been bothing me. 1. All nodes were created with basically the same interface, that always required a document. Now constructors are much more simple for most of them that do not need a document. For the handful that still do, these can only be created from the document itself to prevent the need to pass the Document around separately. 2. Since nodes that require an owner (such as a Document or Family) can only be created through these entities it will greatly improve strategies for caching where changed occur after the document is initially loaded. I haven't heavily jumped into this teritory, but it will have to happen soon. 3. Families are now structures correctly with ChildNode, HusbandNode and WifeNode rather than trying to step around these. Apart from being closer to the GEDCOM structure this also make it easier to build families programamtically without awkwardly moving pointers around as values. 4. Nodes is a new type for Node. Other more minor changes such as deleting nodes and correctly mapping documents when duplicating nodes.
Decoder: More flexible pointers. Fixes #230 (#231) Pointers can really include anything, apart from a "@". This patch also adds some more test edge cases.