diff --git a/src/script/api/script_date.cpp b/src/script/api/script_date.cpp index ae3dff78c6..27289d75d0 100644 --- a/src/script/api/script_date.cpp +++ b/src/script/api/script_date.cpp @@ -25,7 +25,7 @@ return (ScriptDate::Date)_date; } -/* static */ int32 ScriptDate::GetYear(ScriptDate::Date date) +/* static */ SQInteger ScriptDate::GetYear(ScriptDate::Date date) { if (date < 0) return DATE_INVALID; @@ -34,7 +34,7 @@ return ymd.year; } -/* static */ int32 ScriptDate::GetMonth(ScriptDate::Date date) +/* static */ SQInteger ScriptDate::GetMonth(ScriptDate::Date date) { if (date < 0) return DATE_INVALID; @@ -43,7 +43,7 @@ return ymd.month + 1; } -/* static */ int32 ScriptDate::GetDayOfMonth(ScriptDate::Date date) +/* static */ SQInteger ScriptDate::GetDayOfMonth(ScriptDate::Date date) { if (date < 0) return DATE_INVALID; @@ -52,7 +52,7 @@ return ymd.day; } -/* static */ ScriptDate::Date ScriptDate::GetDate(int32 year, int32 month, int32 day_of_month) +/* static */ ScriptDate::Date ScriptDate::GetDate(SQInteger year, SQInteger month, SQInteger day_of_month) { if (month < 1 || month > 12) return DATE_INVALID; if (day_of_month < 1 || day_of_month > 31) return DATE_INVALID; @@ -61,7 +61,7 @@ return (ScriptDate::Date)::ConvertYMDToDate(year, month - 1, day_of_month); } -/* static */ int32 ScriptDate::GetSystemTime() +/* static */ SQInteger ScriptDate::GetSystemTime() { time_t t; time(&t); diff --git a/src/script/api/script_date.hpp b/src/script/api/script_date.hpp index 5daa5fb03f..4373706aa7 100644 --- a/src/script/api/script_date.hpp +++ b/src/script/api/script_date.hpp @@ -55,21 +55,21 @@ public: * @param date The date to get the year of. * @return The year. */ - static int32 GetYear(Date date); + static SQInteger GetYear(Date date); /** * Get the month of the given date. * @param date The date to get the month of. * @return The month. */ - static int32 GetMonth(Date date); + static SQInteger GetMonth(Date date); /** * Get the day (of the month) of the given date. * @param date The date to get the day of. * @return The day. */ - static int32 GetDayOfMonth(Date date); + static SQInteger GetDayOfMonth(Date date); /** * Get the date given a year, month and day of month. @@ -78,7 +78,7 @@ public: * @param day_of_month The day of month of the to-be determined date. * @return The date. */ - static Date GetDate(int32 year, int32 month, int32 day_of_month); + static Date GetDate(SQInteger year, SQInteger month, SQInteger day_of_month); /** * Get the time of the host system. @@ -86,7 +86,7 @@ public: * @api -ai * @note This uses the clock of the host system, which can skew or be set back. Use with caution. */ - static int32 GetSystemTime(); + static SQInteger GetSystemTime(); }; #endif /* SCRIPT_DATE_HPP */