public static EcmaValue FormatRangeToParts([This] EcmaValue thisValue, EcmaValue startDate, EcmaValue endDate) { DateTimeFormat formatter = thisValue.GetUnderlyingObject <DateTimeFormat>(); return(formatter.FormatRange(startDate, endDate, out string[] annotations).ToPartArray(PropertyKey.Source, annotations)); }
public static EcmaValue FormatRange([This] EcmaValue thisValue, EcmaValue startDate, EcmaValue endDate) { DateTimeFormat formatter = thisValue.GetUnderlyingObject <DateTimeFormat>(); return(formatter.FormatRange(startDate, endDate, out _).ToString()); }