Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
tfussell committed Feb 8, 2020
1 parent 53b2853 commit 5a2498c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/utils/date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ date date::today()

int date::weekday() const
{
#ifdef __APPLE__
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);

return safe_localtime(time).tm_wday;
Expand Down

0 comments on commit 5a2498c

Please sign in to comment.