예제 #1
0
        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));
        }
예제 #2
0
        public static EcmaValue FormatRange([This] EcmaValue thisValue, EcmaValue startDate, EcmaValue endDate)
        {
            DateTimeFormat formatter = thisValue.GetUnderlyingObject <DateTimeFormat>();

            return(formatter.FormatRange(startDate, endDate, out _).ToString());
        }