public void TestStringToDateTimeOffset() { Assert.AreEqual(new DateTimeOffset(1976, 12, 12, 0, 0, 0, TimeSpan.Zero), PrimitiveTypeConverter.ConvertTo <DateTimeOffset>("1976-12-12")); }
public void TestEnumToString() { var x = QC.LessOrEqual; Assert.AreEqual("<=", PrimitiveTypeConverter.ConvertTo <string>(x)); }
private DateTimeOffset toDTO() { return(PrimitiveTypeConverter.ConvertTo <DateTimeOffset>(toDTOParseable(_value)).ToUniversalTime()); }
public DateTime?ToDateTime() => Value == null ? null : (DateTime?)PrimitiveTypeConverter.ConvertTo <DateTime>(Value);
public static string ToFhirDateTime(this System.DateTimeOffset me) => PrimitiveTypeConverter.ConvertTo <string>(me);
public override string ToString() { return(PrimitiveTypeConverter.ConvertTo <string>(this.ObjectValue)); }
public override string ToString() { return(PrimitiveTypeConverter.ConvertTo <string>(Value));//.ConvertTo<string>()); }
public static PartialDateTime FromDateTime(DateTimeOffset dto) { return(new PartialDateTime { _value = PrimitiveTypeConverter.ConvertTo <string>(dto) }); }
public static Evaluator Today() { return(Eval.TypedValue(PartialDateTime.Parse(PrimitiveTypeConverter.ConvertTo <string>(DateTime.Today)))); }
public void TestEnumToString() { var x = Quantity.QuantityComparator.LessOrEqual; Assert.AreEqual("<=", PrimitiveTypeConverter.ConvertTo <string>(x)); }
public override string ToString() => Value != null?PrimitiveTypeConverter.ConvertTo <string>(Value) : "";
public DateTimeOffset?ToDateTimeOffset() => Value == null ? null : (DateTimeOffset?)PrimitiveTypeConverter.ConvertTo <DateTimeOffset>(Value);
public void TestStringToDateTime() { Assert.AreEqual(new DateTime(1976, 12, 12), PrimitiveTypeConverter.ConvertTo <DateTime>("1976-12-12")); }
public FhirDateTime(DateTimeOffset dt) : this(PrimitiveTypeConverter.ConvertTo <string>(dt)) { }
public static NumberValue Parse(string text) { return(new NumberValue(PrimitiveTypeConverter.ConvertTo <Decimal>(text)));//.ConvertTo<Decimal>())); }
public static FhirDateTime Now() { return(new FhirDateTime(PrimitiveTypeConverter.ConvertTo <string>(DateTimeOffset.Now))); }
private string toStringRepresentation(ITypedElement vp) { return(vp == null || vp.Value == null ? null : PrimitiveTypeConverter.ConvertTo <string>(vp.Value)); }
public DateTimeOffset ToUniversalTime() { return(PrimitiveTypeConverter.ConvertTo <DateTimeOffset>(_value).ToUniversalTime()); }
public static PartialTime Now() { return(new PartialTime { _value = PrimitiveTypeConverter.ConvertTo <string>(DateTimeOffset.Now).Substring(10) }); }
public static string ToFhirDateTime(this System.DateTimeOffset?me) => me.HasValue ? PrimitiveTypeConverter.ConvertTo <string>(me) : null;
internal static string Canonical(this object value) => PrimitiveTypeConverter.ConvertTo <string>(value);