Skip to content

Commit

Permalink
add missing iomanip header file in Date.cpp (#201)
Browse files Browse the repository at this point in the history
required for std::put_time function
  • Loading branch information
sandeshkhadka authored Oct 10, 2023
1 parent 277fc50 commit 144829b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/date/Date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <chrono>
#include <ctime>
#include <iomanip>

#include "data/MonthNames.h"
#include "data/WeekdayNames.h"
Expand Down Expand Up @@ -30,7 +31,8 @@ std::string betweenDate(const auto& from, const auto& to)
{
if (from > to)
{
throw std::runtime_error{fmt::format("Start date is greater than end date. {{from: {}, to: {}}}", serializeTimePoint(from),serializeTimePoint(to))};
throw std::runtime_error{fmt::format("Start date is greater than end date. {{from: {}, to: {}}}",
serializeTimePoint(from), serializeTimePoint(to))};
}

const auto size = std::chrono::duration_cast<std::chrono::seconds>(to - from).count();
Expand Down

0 comments on commit 144829b

Please sign in to comment.