Skip to content

generalize allowed date formats #389

@smrgeoinfo

Description

@smrgeoinfo

generalize dates to allow YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DDThh-mm etc....
Update LinkML and JSON schema.

In JSON schema want:

"anyOf": [
                        {
                            "format": "date",
                            "description": "YYYY-MM-DD"
                        },
                        {
                            "format": "date-time",
                            "description": "YYYY:MM::DDThh:mm:ss.sTZD"
                        },
                        {
                            "pattern": "^(?:[1]?[0-9]{3}|20[0-2][0-9])$",
                            "description": "gets YYYY"
                        },
                        {
                            "pattern": "^(?:[1]?[0-9]{3}|20[0-2][0-9])-(?:0[1-9]|1[0-2])$",
                            "description": "gets YYYY-MM"
                        }
                    ],

looks like pattern is the corresponding LinkML schema slot property for the regex statements

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions