Skip to content

Commit

Permalink
debugged
Browse files Browse the repository at this point in the history
  • Loading branch information
xanthospap committed Sep 29, 2024
1 parent 733eaa0 commit e234a55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/dtdatetime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ class datetime_interval {
if constexpr (DT == DateTimeDifferenceType::FractionalSeconds) {
/* difference in fractional seconds */
const double big = static_cast<double>(seconds::max_in_day * m_days);
return RT(m_sign * (big + to_fractional_seconds(S(m_secs))));
return RT(m_sign * (big + to_fractional_seconds(S(m_secs)).seconds()));
} else if constexpr (DT == DateTimeDifferenceType::FractionalDays) {
/* difference in fractional days */
const double big = static_cast<double>(m_days);
return RT(m_sign * (big + to_fractional_days(S(m_secs))));
return RT(m_sign * (big + to_fractional_days(S(m_secs)).days()));
} else {
/* difference in fractional years */
const double big = static_cast<double>(m_days);
return RT(m_sign * (big + to_fractional_days(S(m_secs))) /
return RT(m_sign * (big + to_fractional_days(S(m_secs)).days()) /
DAYS_IN_JULIAN_YEAR);
}
}
Expand Down

0 comments on commit e234a55

Please sign in to comment.