@@ -1898,7 +1898,7 @@ public Operand VisitDATEDIF_fun(mathParser.DATEDIF_funContext context)
18981898 var endMyDate = ( DateTime ) secondValue . DateValue ;
18991899 var t = thirdValue . TextValue . ToLower ( ) ;
19001900
1901- if ( t == "y" ) {
1901+ if ( CharUtil . Equals ( t , "y" ) ) {
19021902 #region y
19031903 bool b = false ;
19041904 if ( startMyDate . Month < endMyDate . Month ) {
@@ -1912,7 +1912,7 @@ public Operand VisitDATEDIF_fun(mathParser.DATEDIF_funContext context)
19121912 return Operand . Create ( ( endMyDate . Year - startMyDate . Year - 1 ) ) ;
19131913 }
19141914 #endregion
1915- } else if ( t == "m" ) {
1915+ } else if ( CharUtil . Equals ( t , "m" ) ) {
19161916 #region m
19171917 bool b = false ;
19181918 if ( startMyDate . Day <= endMyDate . Day ) b = true ;
@@ -1922,9 +1922,9 @@ public Operand VisitDATEDIF_fun(mathParser.DATEDIF_funContext context)
19221922 return Operand . Create ( ( endMyDate . Year * 12 + endMyDate . Month - startMyDate . Year * 12 - startMyDate . Month - 1 ) ) ;
19231923 }
19241924 #endregion
1925- } else if ( t == "d" ) {
1925+ } else if ( CharUtil . Equals ( t , "d" ) ) {
19261926 return Operand . Create ( ( endMyDate - startMyDate ) . Days ) ;
1927- } else if ( t == "yd" ) {
1927+ } else if ( CharUtil . Equals ( t , "yd" ) ) {
19281928 #region yd
19291929 var day = endMyDate . DayOfYear - startMyDate . DayOfYear ;
19301930 if ( endMyDate . Year > startMyDate . Year && day < 0 ) {
@@ -1933,7 +1933,7 @@ public Operand VisitDATEDIF_fun(mathParser.DATEDIF_funContext context)
19331933 }
19341934 return Operand . Create ( ( day ) ) ;
19351935 #endregion
1936- } else if ( t == "md" ) {
1936+ } else if ( CharUtil . Equals ( t , "md" ) ) {
19371937 #region md
19381938 var mo = endMyDate . Day - startMyDate . Day ;
19391939 if ( mo < 0 ) {
@@ -1948,7 +1948,7 @@ public Operand VisitDATEDIF_fun(mathParser.DATEDIF_funContext context)
19481948 }
19491949 return Operand . Create ( ( mo ) ) ;
19501950 #endregion
1951- } else if ( t == "ym" ) {
1951+ } else if ( CharUtil . Equals ( t , "ym" ) ) {
19521952 #region ym
19531953 var mo = endMyDate . Month - startMyDate . Month ;
19541954 if ( endMyDate . Day < startMyDate . Day ) mo = mo - 1 ;
@@ -3713,7 +3713,7 @@ public Operand VisitLOOKUP_fun(mathParser.LOOKUP_funContext context)
37133713 return Operand . Error ( "Function LOOKUP parameter 2 is null!" ) ;
37143714 }
37153715
3716- var engine = new LookupAlgorithmEngine ( ) ;
3716+ var engine = new AntlrLookupEngine ( ) ;
37173717 if ( engine . Parse ( secondValue . TextValue ) == false ) {
37183718 return Operand . Error ( "Function LOOKUP parameter 2 Parse is error!" ) ;
37193719 }
0 commit comments