andersnm / ExcelNumberFormat

Parse and render Excel number format strings
MIT License
79 stars 27 forks source link

Date separator according to culture #15

Closed pmajIDC closed 5 years ago

pmajIDC commented 5 years ago

Hi, I am using package to formatting date time and I find the problem with date separator in different culture. You can easy fixed it. You can add condition, which replace '/' with date separator, in method FormatLiteral in class Formatter.

For example: else if (token.Length == 1 && token[0] == '/' && culture != null) { literal = DateTime.MaxValue.ToString("/d", culture)[0].ToString(); }

andersnm commented 5 years ago

Hi and thanks for the report! Just released this as version 1.0.6!