public int getDays ( ) { switch ( _units ) { case Days : return _amount ; case Weeks : return _amount * 7 ; case Months : if ( _amount <= 1 ) return _amount * 30 ; else if ( _amount < 12 ) return ( _amount * 61 ) / 2 ; else return ( _amount * 365 ) / 12 ; default : throw new UnsupportedOperationException ( ) ; } }
Get amount of this Duration in days