Skip to content

Date number format with comma drops commas #22

@andersnm

Description

@andersnm

Reported in ClosedXML/ClosedXML#1274

    Test(new DateTime(2017, 10, 16, 0, 0, 0), "dddd, MMMM d, yyyy", "Monday, October 16, 2017");
    Expected string length 24 but was 22. Strings differ at index 6.
    Expected: "Monday, October 16, 2017"
    But was:  "Monday October 16 2017"

This happens because FormatLiteral() ignores commas in all kinds of formats. Commas are used for thousand division in numeric number formats, but apparently not in date formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions