public static object Substring(object x, object y) { if (IsType.String(x) && IsType.AnyInt(y)) { return(Strings.Substring((string)x, Integers.ToInteger(y))); } return(null); }
public static object GetLength(object x) { if (IsType.String(x)) { return(Strings.GetLength((string)x)); } return(null); }
public static object Trim(object x) { if (IsType.String(x)) { return(Strings.Trim((string)x)); } return(null); }
public static object GetAge(object x) { if (IsType.DateTime(x)) { return(((DateTime)x).GetAge()); } return(null); }
public static object Substring(object x, object y, object z) { if (!IsType.String(x) || !AreTypes.AnyInt(y, z)) { return(null); } var r = Strings.Substring((string)x, Integers.ToInteger(y), Integers.ToInteger(z)); return(r); }
public static object AddYears(object x, object y) { if (!IsType.AnyInt(y)) { return(null); } if (IsType.DateTime(x)) { return(((DateTime)x).AddYearsSafe(Integers.ToInteger(y))); } return(null); }
public static object AddDays(object x, object y) { if (!IsType.AnyDouble(y)) { return(null); } if (IsType.DateTime(x)) { return(((DateTime)x).AddDaysSafe(Doubles.ToDouble(y))); } return(null); }
public static object ToYears(object x) { if (IsType.TimeSpan(x)) { return(((TimeSpan)x).ToYears()); } if (IsType.DateTime(x)) { return(new TimeSpan(((DateTime)x).Ticks).ToYears()); } return(null); }
public static object GetDay(object x) { if (IsType.DateTime(x)) { return(((DateTime)x).GetDay()); } if (IsType.TimeSpan(x)) { return(((TimeSpan)x).Days); } return(null); }