Skip to content

Commit 31528ee

Browse files
committed
fix
1 parent 970ca93 commit 31528ee

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.time.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -472,28 +472,6 @@ public override void ToString(StringBuilder stringBuilder, bool addBrackets)
472472
}
473473
}
474474

475-
internal class Function_DAYSINMONTH : Function_2
476-
{
477-
public Function_DAYSINMONTH(FunctionBase func1, FunctionBase func2) : base(func1, func2)
478-
{
479-
}
480-
481-
public override Operand Evaluate(AlgorithmEngine work, Func<string, Operand> tempParameter)
482-
{
483-
var args1 = func1.Evaluate(work, tempParameter); if (args1.IsNotNumber) { args1 = args1.ToNumber("Function '{0}' parameter {1} is error!", "DaysInMonth", 1); if (args1.IsError) { return args1; } }
484-
var args2 = func2.Evaluate(work, tempParameter); if (args2.IsNotNumber) { args2 = args2.ToNumber("Function '{0}' parameter {1} is error!", "DaysInMonth", 2); if (args2.IsError) { return args2; } }
485-
int year = args1.IntValue;
486-
int month = args2.IntValue;
487-
if (month < 1 || month > 12) { return Operand.Error("Function '{0}' parameter {1} is error!", "DaysInMonth", 2); }
488-
int days = DateTime.DaysInMonth(year, month);
489-
return Operand.Create((decimal)days);
490-
}
491-
public override void ToString(StringBuilder stringBuilder, bool addBrackets)
492-
{
493-
AddFunction(stringBuilder, "DaysInMonth");
494-
}
495-
}
496-
497475
internal class Function_DAYS360 : Function_3
498476
{
499477
public Function_DAYS360(FunctionBase func1, FunctionBase func2, FunctionBase func3) : base(func1, func2, func3)

0 commit comments

Comments
 (0)