Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x calendar changes #2937

Merged
merged 5 commits into from
Aug 17, 2022
Merged

2.x calendar changes #2937

merged 5 commits into from
Aug 17, 2022

Conversation

MarkBaker
Copy link
Member

@MarkBaker MarkBaker commented Jul 13, 2022

This is:

- [ ] a bugfix
- [X] a new feature
- [ ] refactoring
- [ ] additional unit tests

Checklist:

Why this change is needed?

Calendar setting (1900/1904) from a loaded spreadsheet is now saved against the spreadsheet, allowing handling of multiple spreadsheets with different settings, rather than maintained as a global setting. The static global setting is still used for calcuation/formatting, but is set from the spreadsheet when required, then reset afterwards.

This does mean it's dangerous to rely on the old setting, because it is no longer guaranteed to be consistent

…ate a new ExcelCalendar property for Spreadsheets, and modify the Xlsx and Xls Readers/Writers to maintain 1900 or 1904 calendar against the spreadsheet
Set Excel calendar to be used for calculations and formatting for the calendar stored against the spreadsheet.
…is used for all date-related calculations and formatting
@MarkBaker MarkBaker force-pushed the 2.x-Calendar-Changes branch from 2ce7a2b to 765037e Compare August 17, 2022 14:41
… approach, it shouldn't be necessary to save to a temporary file and then restore, a deep clone should be the correct approach)
@MarkBaker MarkBaker merged commit a002288 into 2.0-Development Aug 17, 2022
@MarkBaker MarkBaker deleted the 2.x-Calendar-Changes branch August 17, 2022 16:40
@oleibman
Copy link
Collaborator

oleibman commented Sep 3, 2022

@MarkBaker - this change is probably a fix for issue #1635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants