using System; using IwbZero.Expr; using IwbZero.ToolCommon.StringModel; namespace IwbZero.ExprFunctions.Functions { /// /// 获取日期(年) /// public class FunGetYear:IIwbFunction { public string Invoke(ExprObject exprObj) { var year = DateTime.Now.Year; if (exprObj.ChildCount > 0) { year = exprObj.GetChild(0).Expr.StrToDt().Year; } return year.ToString(); } } }