mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix windows build
This commit is contained in:
parent
53b2853ae3
commit
5a2498c229
|
@ -126,7 +126,11 @@ date date::today()
|
||||||
|
|
||||||
int date::weekday() const
|
int date::weekday() const
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
std::tm tm{0, 0, 0, day, month - 1, year - 1900, 0, 0, 0, 0, nullptr};
|
std::tm tm{0, 0, 0, day, month - 1, year - 1900, 0, 0, 0, 0, nullptr};
|
||||||
|
#else
|
||||||
|
std::tm tm{0, 0, 0, day, month - 1, year - 1900, 0, 0, 0};
|
||||||
|
#endif
|
||||||
std::time_t time = std::mktime(&tm);
|
std::time_t time = std::mktime(&tm);
|
||||||
|
|
||||||
return safe_localtime(time).tm_wday;
|
return safe_localtime(time).tm_wday;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user