From 16efeae5b1b67d9c46dc02a8c50de64532f7f407 Mon Sep 17 00:00:00 2001 From: joehan109 Date: Sat, 27 May 2023 00:22:35 +0800 Subject: [PATCH] This fix date and time pattern validation issues (#1547) --- numfmt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numfmt.go b/numfmt.go index 57aa8c8e..9e48a6e5 100644 --- a/numfmt.go +++ b/numfmt.go @@ -1049,7 +1049,7 @@ func (f *File) checkDateTimePattern() error { p := nfp.NumberFormatParser() for _, section := range p.Parse(pattern) { for _, token := range section.Items { - if inStrSlice(supportedNumberTokenTypes, token.TType, false) == -1 || inStrSlice(supportedNumberTokenTypes, token.TType, false) != -1 { + if inStrSlice(supportedTokenTypes, token.TType, false) == -1 || inStrSlice(supportedNumberTokenTypes, token.TType, false) != -1 { return ErrUnsupportedNumberFormat } }