From: Carsten Niehaus Date: Tue, 14 Jun 2005 14:43:57 +0000 (+0000) Subject: * fix some bugs with the isotopetable X-Git-Tag: v3.80.2~300^2~105 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=e043686f628984cd10f6e75ae422327ecf3b2ad0;p=libqmvoc.git * fix some bugs with the isotopetable * add more date/fix data svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=425352 --- diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index 9043c63..9234612 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -744,16 +744,19 @@ QString Isotope::halflifeToHtml() const halflife = i18n("%1 billion years").arg( m_halflife/1000000000.0 ); else halflife = i18n("%1 years").arg( m_halflife ); -// return halflife; } else { if ( m_halflife < 120 ) halflife = i18n("%1 seconds").arg( m_halflife ); - else if ( m_halflife > 1200 ) + else if ( m_halflife > 1000 ) halflife = i18n("%1 minutes").arg( m_halflife/60.0 ); - else if ( m_halflife > 12000 ) - halflife = i18n("%1 days").arg( m_halflife/3600.0 ); + else if ( m_halflife > 3600 ) + halflife = i18n("%1 hours").arg( m_halflife/( 60*60 ) ); + if ( m_halflife > 86400 ) //one day + halflife = i18n("%1 days").arg( m_halflife/( 60*60*24 ) ); + if ( m_halflife > ( 31536000 * 2 ) ) //two year + halflife = i18n("%1 years").arg( m_halflife/( 3600.0*365 )); } return halflife;