betty.ancestry.date module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.ancestry.date module

Date types with dates.

class betty.ancestry.date.HasDate

  Bases: `LinkedDataDumpableJsonLdObject`

  A resource with date information.

  __init__(*args: Any, date: Date | DateRange | None = None, **kwargs: Any)
  dated_linked_data_contexts() → tuple[str | None, str | None, str | None]

    Get the JSON-LD context term definition IRIs for the possible dates.

    Returns:

      A 3-tuple with the IRI for a single date, a start date, and an end date, respectively.

  async dump_linked_data(project: Project) → DumpMapping[Dump]

    Dump this instance to JSON-LD.

  async classmethod linked_data_schema(project: Project) → JsonLdObject

    Define the JSON Schema for `betty.json.linked_data.LinkedDataDumpable.dump_linked_data()`.