Repository navigation
Read b and bb as Buddhist era year date codes - #798
Merged
Merged
Conversation
Collaborator
|
This is great, thank you. Would you mind adding test Excel documents for the supported formats using these format strings? |
xls, xlsx, xlsb and strict xlsx saved by Excel 365 with bbbb, bb, b, BBBB, bbbb/mm/dd, "Year "bbbb and [$-41E]bbbb/mm/dd as dates, and 0\b and 0"b" as numbers.
Contributor
Author
|
Added in e3ae812:
|
zzoraemon043
added a commit
to zzoraemon043/zzoraemon043
that referenced
this pull request
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Excel reads
bandbb(two-digit) andbbbb(four-digit) as the Buddhist era year. ExcelDataReader does not know thebcode, so a cell with a format such asbbbbis read as a double, not a DateTime.Excel 365, value 45306.25:
bbbbbbBBBB(Excel saves it asbbbb)"Year "bbbbA single
bis saved by Excel asbb. An escaped or quoted b (0\b,0"b") and[Blue]stay number formats.Change: the tokenizer reads a run of
b/Blike the other date codes, andToken.IsDatePartcounts it as a date part.Tests: new cases in
DateTokensMatchAsciiCaseOnlyandFormatClassification_PreservesEndOfInputAndSections. Six of them fail before the change. The fullExcelDataReader.Testssuite passes on net10.0, net11.0 and net462, and the characterization snapshot is unchanged.