diff --git a/chrono/datetime.cpp b/chrono/datetime.cpp index d76d865..0dc4e7e 100644 --- a/chrono/datetime.cpp +++ b/chrono/datetime.cpp @@ -5,6 +5,7 @@ #include #include #include +#include using namespace std; using namespace ChronoUtilities; @@ -34,6 +35,14 @@ inline bool inRangeExclMax(num1 val, num2 min, num3 max) return (val) >= (min) && (val) < (max); } +/*! + * \brief Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time. + */ +DateTime DateTime::now() +{ + return DateTime::fromTimeStamp(time(nullptr)); +} + /*! * \class ChronoUtilities::DateTime * \brief Represents an instant in time, typically expressed as a date and time of day. @@ -270,5 +279,3 @@ int DateTime::getDatePart(DatePart part) const } return 0; } - - diff --git a/chrono/datetime.h b/chrono/datetime.h index 02a7ced..1218a89 100644 --- a/chrono/datetime.h +++ b/chrono/datetime.h @@ -6,7 +6,6 @@ #include "../conversion/types.h" #include -#include #include namespace ChronoUtilities @@ -315,14 +314,6 @@ constexpr inline DateTime DateTime::eternity() return DateTime(std::numeric_limits::max()); } -/*! - * \brief Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time. - */ -inline DateTime DateTime::now() -{ - return DateTime::fromTimeStamp(time(nullptr)); -} - /*! * \brief Indicates whether two DateTime instances are equal. */