Skip to content

XLDateTime calculations for doubles. #299

@wiluite

Description

@wiluite
XLDateTime dt(24472.0);
auto tmo = dt.tm();
std::cout << tmo.tm_year + 1900 << '-' << tmo.tm_mon + 1 << '-' << tmo.tm_mday;

Is this code too problematic? It calculates 0 as 'day of month'.

std::asctime(&tmo) also fails to proceed further, because it probably returns nullptr;

imho:
note, there is a good Howard Hinnant's date library for such things.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingresolvedThis issue has been resolved.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions