contract TimingCrowdsale {

    // Date of start pre-ICO and ICO.
    uint public constant preICOstartTime = 1517461200; // start at Thursday, February 1, 2018 5:00:00 AM
    uint public constant ICOstartTime =    1518670800; // start at Thursday, February 15, 2018 5:00:00 AM
    uint public constant ICOendTime =      1521090000; // end at Thursday, March 15, 2018 5:00:00 AM

    function currentTime() internal view returns (uint) {
        return now;
    }

    function isPreICO() public view returns (bool) {
        var curTime = currentTime();
        return curTime < ICOstartTime && curTime >= preICOstartTime;
    }

    function isICO() public view returns (bool) {
        var curTime = currentTime();
        return curTime < ICOendTime && curTime >= ICOstartTime;
    }

    function isPreICOFinished() public view returns (bool) {
        return currentTime() > ICOstartTime;
    }

    function isICOFinished() public view returns (bool) {
        return currentTime() > ICOendTime;
    }
}
function currentTime() internal view returns (uint) {
    return now;
}

// end at Thursday, March 15, 2018 5:00:00 AM