// 检测日期是否是当前年
export default {
    execute: function () {
        if (arguments && arguments[0] && arguments[0][0]) {
            var nowTime = new Date();
            var nowYear = nowTime.getFullYear()
            let field = arguments[0][0].FieldCode;
            let fieldTime = arguments[1].getMasterData().getValue(field);
            var fieldDateTime = new Date(fieldTime);
            var fieldYear = fieldDateTime.getFullYear()
            if (fieldYear === nowYear) {
                return true
            } else {
                return false
            }

        } else {
            GAMS.Common.messagePrompt('GetMDByCode公式：参数配置有误');
            return '';
        }

    },
    getResultType: function () {
        return FMR.ConstDataTypes.General;
    }
}