public void setFMDate ( String value ) { final long multiplier = 100000000 ; Calendar cal = Calendar . getInstance ( ) ; double val = Double . parseDouble ( value ) ; if ( val < 1000000D || val > 9999999D ) { throw new IllegalArgumentException ( ) ; } long date = ( long ) Math . floor ( val * multiplier ) ; hasTime = date % multiplier != 0 ; date = setCalendar ( cal , Calendar . MILLISECOND , date , 100 ) ; date = setCalendar ( cal , Calendar . SECOND , date , 100 ) ; date = setCalendar ( cal , Calendar . MINUTE , date , 100 ) ; date = setCalendar ( cal , Calendar . HOUR_OF_DAY , date , 100 ) ; date = setCalendar ( cal , Calendar . DAY_OF_MONTH , date , 100 ) ; date = setCalendar ( cal , Calendar . MONTH , date - 1 , 100 ) ; date = setCalendar ( cal , Calendar . YEAR , date + 1700 , 10000 ) ; setTime ( cal . getTimeInMillis ( ) ) ; }
Sets the date value based on the specified FM string representation .