diff options
Diffstat (limited to 'kspread/kspread_functions_helper.cc')
-rw-r--r-- | kspread/kspread_functions_helper.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kspread/kspread_functions_helper.cc b/kspread/kspread_functions_helper.cc index 733deab2..92f7b1ae 100644 --- a/kspread/kspread_functions_helper.cc +++ b/kspread/kspread_functions_helper.cc @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qdatetime.h> +#include <tqdatetime.h> #include "kspread_functions_helper.h" /* DISABLED - we use KCalendarSystem instead -void addMonths( QDate & date, int months ) +void addMonths( TQDate & date, int months ) { int d = date.day(); int m = date.month() + months; @@ -36,13 +36,13 @@ void addMonths( QDate & date, int months ) } // e.g. 31 Feb: decrease day... - while ( !QDate::isValid( y, m, d ) && d > 0 ) + while ( !TQDate::isValid( y, m, d ) && d > 0 ) --d; date.setYMD( y, m, d ); } -void subMonths( QDate & date, int months ) +void subMonths( TQDate & date, int months ) { int d = date.day(); int m = date.month() - months; @@ -55,7 +55,7 @@ void subMonths( QDate & date, int months ) } // e.g. 31 Feb: decrease day - while ( !QDate::isValid( y, m, d ) && d > 0 ) + while ( !TQDate::isValid( y, m, d ) && d > 0 ) --d; date.setYMD( y, m, d ); @@ -63,7 +63,7 @@ void subMonths( QDate & date, int months ) */ -int KSpread::daysPerYear(QDate const & date, int basis) +int KSpread::daysPerYear(TQDate const & date, int basis) { switch( basis ) { @@ -71,7 +71,7 @@ int KSpread::daysPerYear(QDate const & date, int basis) return 360; case 1: - if ( QDate::leapYear( date.year() ) ) + if ( TQDate::leapYear( date.year() ) ) return 366; return 365; @@ -86,7 +86,7 @@ int KSpread::daysPerYear(QDate const & date, int basis) return -1; } -int KSpread::daysBetweenDates(QDate const & date1, QDate const & date2, int basis) +int KSpread::daysBetweenDates(TQDate const & date1, TQDate const & date2, int basis) { int day1, day2, month1, month2, year1, year2; bool isLeapYear = false; @@ -103,7 +103,7 @@ int KSpread::daysBetweenDates(QDate const & date1, QDate const & date2, int basi months = month2 - month1 + years * 12; days = day2 - day1; - isLeapYear = QDate::leapYear( year1 ); + isLeapYear = TQDate::leapYear( year1 ); switch (basis) { |