
const MODERN_ACTIVITY = 15;
const HALF_LIFE_PERIOD = 5730;

export default function dateSample(sampleActivity) {
    let nam = Number(sampleActivity);
    if (typeof sampleActivity != 'string') {
        return false;
    } else if (Number(sampleActivity) <= 0 || Number(sampleActivity) > MODERN_ACTIVITY) {
        return false;
      } else if (isNaN(nam) || nam == 0) {
         return false;
    } else {
       let time = Math.log(MODERN_ACTIVITY / sampleActivity) / (0.693 / HALF_LIFE_PERIOD);
       return Math.ceil(time);
    }
};