function getMonth(type,cell){
   var text="";
   if(cell.value){
      cell.value.richText.forEach(tmmobj=>{
        text+=tmmobj.text;
      });
   }else{
     console.log(cell);
   }

    var qs=["一","二","三","四"];
    var qmap={
      "一":"03","二":"06","三":"09","四":"12"
    };
    //ITQ
    if(type=="ITQ" || type=="ST" || type=="GT"){
      var p1=/\d{4}[-|-]\d{2}[-|-]\d{2}/gm;
      var ms=text.match(p1);
      var lstDate=ms[1];
      var ds=lstDate.split("-");
      var rtnDate=ds[0]+ds[1];
      return rtnDate;
    }else{
      var testbool=false;
      var p2=/(\d{4})|([一|二|三|四])/gm;
      var ms=text.match(p2);
      for(var q of qs){
        var jstr=ms.join(",");
        var re = new RegExp(q);
        if(re.test(jstr)){
          testbool=true;
          break;
        }
      }
      if(!testbool){//如果不是季
        var p3=/\d{4}[-|-]\d{2}/gm;
        var ms=text.match(p3);
          return ms[0].split("-").join("");
      }else{//如果是季
          var qstr=ms[1];
          var rtndate=ms[0]+qmap[qstr];
          return rtndate;
      }
    }
  }
  module.exports=getMonth;