FunGetDay.cs 525 B

123456789101112131415161718192021222324
  1. using System;
  2. using IwbZero.Expr;
  3. using IwbZero.ToolCommon.StringModel;
  4. namespace IwbZero.ExprFunctions.Functions
  5. {
  6. /// <summary>
  7. /// 获取日期(日)
  8. /// </summary>
  9. public class FunGetDay:IIwbFunction
  10. {
  11. public string Invoke(ExprObject exprObj)
  12. {
  13. int day = DateTime.Now.Day;
  14. if (exprObj.ChildCount > 0)
  15. {
  16. day = exprObj.GetChild(0).Expr.StrToDt().Day;
  17. }
  18. return day.ToString();
  19. }
  20. }
  21. }