Skip to content

Create warnings for bad date input in squads #7573

@mbergen

Description

@mbergen

Is your feature request related to a problem? Please describe.
Some wikis tend to enter bad input into the date fields of Squad tables.
That ranges from incomplete dates (e.g. YYYY instead of the expected YYYY-??-??) to Abbr tags around dates (???).

As the dates are handled with ReferenceCleaner, it only supports complete ISO dates, or those with days or months replaced with ?? or XX.

Instead of silent continuation, Squad should create warnings for incomplete dates when there is input to the field.

Describe the solution you'd like
In
https://github.com/Liquipedia/Lua-Modules/blob/main/lua/wikis/commons/Squad/Utils.lua#L208
create an error message if the parsed date is an empty string, while the input string is not.

Additional context
Inspiration:
Debugging the issue explained here:
https://discord.com/channels/93055209017729024/268719633366777856/1509561755980795945
(Incomplete dates not shown)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions