File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
csharp/ToolGood.Algorithm2
src/main/java/toolgood/algorithm/internals Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1731,7 +1731,8 @@ public virtual Operand VisitDATEVALUE_fun(mathParser.DATEVALUE_funContext contex
17311731 {
17321732 var args = new List < Operand > ( ) ;
17331733 foreach ( var item in context . expr ( ) ) { var aa = item . Accept ( this ) ; if ( aa . IsError ) { return aa ; } args . Add ( aa ) ; }
1734- int type = 0 ;
1734+ if ( args [ 0 ] . Type == OperandType . DATE ) { return args [ 0 ] ; }
1735+ int type = 0 ;
17351736 if ( args . Count == 2 ) {
17361737 var secondValue = args [ 1 ] . ToNumber ( "Function DATEVALUE parameter 2 is error!" ) ;
17371738 if ( secondValue . IsError ) { return secondValue ; }
Original file line number Diff line number Diff line change 2020 <Product >ToolGood.Algorithm</Product >
2121 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2222 <SignAssembly >true</SignAssembly >
23- <Version >3.4.1</Version >
23+ <Version >3.4.1.1 </Version >
2424 <AssemblyOriginatorKeyFile >ToolGood.Algorithm.snk</AssemblyOriginatorKeyFile >
2525 <DelaySign >false</DelaySign >
2626 <DocumentationFile >bin\$(Configuration)\$(TargetFramework)\ToolGood.Algorithm.xml</DocumentationFile >
Original file line number Diff line number Diff line change 66
77 <groupId >io.github.toolgood</groupId >
88 <artifactId >toolgood-algorithm</artifactId >
9- <version >3.4.1.0 </version >
9+ <version >3.4.1.1 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >toolgood.algorithm</name >
Original file line number Diff line number Diff line change @@ -2356,7 +2356,8 @@ public Operand visitDATEVALUE_fun(final DATEVALUE_funContext context) {
23562356 }
23572357 args .add (aa );
23582358 }
2359- int type = 0 ;
2359+ if (args .get (0 ).Type () == OperandType .DATE ) { return args .get (0 ); }
2360+ int type = 0 ;
23602361 if (args .size () == 2 ) {
23612362 Operand secondValue = args .get (1 ).ToNumber ("Function DATEVALUE parameter 2 is error!" );
23622363 if (secondValue .IsError ()) {
You can’t perform that action at this time.
0 commit comments