public DateTimeToClip(string min, string max) { var caster = new DateTimeCaster(); Min = caster.Execute(min); Max = caster.Execute(max); }
protected override bool Apply(object x) { var caster = new DateTimeCaster(); var dtX = caster.Execute(x); var dtY = caster.Execute(Reference); return(Compare(dtX, dtY)); }
protected override bool Apply(object x) { var caster = new DateTimeCaster(); var dtX = caster.Execute(x); return((dtX.TimeOfDay.Ticks) % (new TimeSpan(1, 0, 0).Ticks) == 0); }
protected override bool ApplyWithReference(object reference, object x) { var builder = new DateTimeIntervalBuilder(reference); builder.Build(); var interval = builder.GetInterval(); var caster = new DateTimeCaster(); var dtX = caster.Execute(x); return(interval.Contains(dtX)); }
private object EvaluateUncasted(object value) { if (value as string == "(null)" || (value is string && string.IsNullOrEmpty(value as string))) { return(EvaluateNull()); } var caster = new DateTimeCaster(); var dateTime = caster.Execute(value); return(EvaluateDateTime(dateTime)); }
private object EvaluateUncasted(object value) { if (value as string == "null") { EvaluateNull(); } var caster = new DateTimeCaster(); var dateTime = caster.Execute(value); return(EvaluateDateTime(dateTime)); }
private DateTime?CastToDateTime(object obj) { if (obj == null) { return(null); } var caster = new DateTimeCaster(); if (caster.IsValid(obj)) { return(caster.Execute(obj)); } throw new ArgumentException(); }
public NullToDate(string date) { var caster = new DateTimeCaster(); DefaultDate = caster.Execute(date); }
public NullToDate(string dt) { var caster = new DateTimeCaster(); Default = caster.Execute(dt); }