contract Date {

    bytes32 constant private _JANUARY = keccak256("Jan");
    bytes32 constant private _FEBRUARY = keccak256("Feb");
    bytes32 constant private _MARCH = keccak256("Mar");
    bytes32 constant private _APRIL = keccak256("Apr");
    bytes32 constant private _MAY = keccak256("May");
    bytes32 constant private _JUNE = keccak256("Jun");
    bytes32 constant private _JULY = keccak256("Jul");
    bytes32 constant private _AUGUST = keccak256("Aug");
    bytes32 constant private _SEPTEMBER = keccak256("Sep");
    bytes32 constant private _OCTOBER = keccak256("Oct");
    bytes32 constant private _NOVEMBER = keccak256("Nov");
    bytes32 constant private _DECEMBER = keccak256("Dec");

    /// @return the number of the month based on its name.
    /// @param _month the first three letters of a month's name e.g. "Jan".
    function _monthToNumber(string memory _month) internal pure returns (uint8) {
        bytes32 month = keccak256(abi.encodePacked(_month));
        if (month == _JANUARY) {
            return 1;
        } else if (month == _FEBRUARY) {
            return 2;
        } else if (month == _MARCH) {
            return 3;
        } else if (month == _APRIL) {
            return 4;
        } else if (month == _MAY) {
            return 5;
        } else if (month == _JUNE) {
            return 6;
        } else if (month == _JULY) {
            return 7;
        } else if (month == _AUGUST) {
            return 8;
        } else if (month == _SEPTEMBER) {
            return 9;
        } else if (month == _OCTOBER) {
            return 10;
        } else if (month == _NOVEMBER) {
            return 11;
        } else if (month == _DECEMBER) {
            return 12;
        } else {
            revert("not a valid month");
        }
    }
}
function _monthToNumber(string memory _month) internal pure returns (uint8) {
        bytes32 month = keccak256(abi.encodePacked(_month));
        if (month == _JANUARY) {
            return 1;
        } else if (month == _FEBRUARY) {
            return 2;
        } else if (month == _MARCH) {
            return 3;
        } else if (month == _APRIL) {
            return 4;
        } else if (month == _MAY) {
            return 5;
        } else if (month == _JUNE) {
            return 6;
        } else if (month == _JULY) {
            return 7;
        } else if (month == _AUGUST) {
            return 8;
        } else if (month == _SEPTEMBER) {
            return 9;
        } else if (month == _OCTOBER) {
            return 10;
        } else if (month == _NOVEMBER) {
            return 11;
        } else if (month == _DECEMBER) {
            return 12;
        } else {
            revert("not a valid month");
        }
    }
/// @return the number of the month based on its name.
/// @param _month the first three letters of a month's name e.g. "Jan".