tafia / calamine

A pure Rust Excel/OpenDocument SpreadSheets file reader: rust on metal sheets
MIT License
1.6k stars 155 forks source link

refactoring DateTime(f64) to DateTime(ExcelDateTime) #394

Closed dimastbk closed 5 months ago

dimastbk commented 5 months ago

Hi!

This PR introduces storing format of cell and is_1904 flag in datetime struct for correcting conversation to any format.

It's a partial fix for #339 and this hack.

cc @lucatrv

tafia commented 5 months ago

I'm sorry the the last PR added conflict to yours (DataType has been renamed to Data).

dimastbk commented 5 months ago

@tafia fixed

dimastbk commented 5 months ago

We can de duplicate some code with this - https://github.com/dimastbk/calamine/pull/1/files, but it seems less readable.

tafia commented 5 months ago

I find both versions ok, up to you I'd say. Thanks for the quick fix.

dimastbk commented 5 months ago

Thanks, I prefer second variant.

tafia commented 5 months ago

Thanks!