|
|
@ -78,7 +78,7 @@ ExtDate::ExtDate( int y, int m, int d)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( !isValid(y,m,d) ) {
|
|
|
|
if ( !isValid(y,m,d) ) {
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
qWarning( "ExtDate: Invalid date %04d-%02d-%02d", y, m, d );
|
|
|
|
tqWarning( "ExtDate: Invalid date %04d-%02d-%02d", y, m, d );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
m_year = 0;
|
|
|
|
m_year = 0;
|
|
|
|
m_month = 0;
|
|
|
|
m_month = 0;
|
|
|
@ -312,7 +312,7 @@ bool ExtDate::setYMD( int y, int m, int d )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( ! isValid(y,m,d) ) {
|
|
|
|
if ( ! isValid(y,m,d) ) {
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
qWarning( "ExtDate: Invalid date %04d-%02d-%02d", y, m, d );
|
|
|
|
tqWarning( "ExtDate: Invalid date %04d-%02d-%02d", y, m, d );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
m_year = 0;
|
|
|
|
m_year = 0;
|
|
|
|
m_month = 0;
|
|
|
|
m_month = 0;
|
|
|
@ -418,7 +418,7 @@ ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f )
|
|
|
|
if ( s.isEmpty() ) { return dt; }
|
|
|
|
if ( s.isEmpty() ) { return dt; }
|
|
|
|
if ( f == Qt::LocalDate ) { //can't use LocalFormat
|
|
|
|
if ( f == Qt::LocalDate ) { //can't use LocalFormat
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
qWarning( "TQDate::fromString: Parameter out of range" );
|
|
|
|
tqWarning( "TQDate::fromString: Parameter out of range" );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return dt;
|
|
|
|
return dt;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1077,7 +1077,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f )
|
|
|
|
|
|
|
|
|
|
|
|
if ( ( s.isEmpty() ) || ( f == Qt::LocalDate ) ) {
|
|
|
|
if ( ( s.isEmpty() ) || ( f == Qt::LocalDate ) ) {
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
#if defined(TQT_CHECK_RANGE)
|
|
|
|
qWarning( "ExtDateTime::fromString: Parameter out of range" );
|
|
|
|
tqWarning( "ExtDateTime::fromString: Parameter out of range" );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
dt.d.setJD( INVALID_DAY );
|
|
|
|
dt.d.setJD( INVALID_DAY );
|
|
|
|
return dt;
|
|
|
|
return dt;
|
|
|
|