public string Convert(ResolutionContext context) { var value = (DateTime)context.SourceValue; var dateTimeHelper = EngineContext.Current.Resolve <IDateTimeHelper>(); var userDateTime = dateTimeHelper.ConvertToUserTime(value); var toPretty = context.MemberName.Contains(PRETTY_PRESENTATION_KEY); if (toPretty) { return(DateTimeFormatter.FormatValue(userDateTime)); } return(userDateTime.ToPersianDateString()); }