/// <summary> /// Append a span of dates in the form of <see cref="DateTime"/> objects to the array. /// </summary> /// <remarks> /// The value of <see cref="DateTime.Kind"/> on any of the inputs does not have any effect on the behaviour of /// this method. /// </remarks> /// <param name="span">Span of dates to add.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder Append(ReadOnlySpan <DateTime> span) { InnerBuilder.Reserve(span.Length); foreach (var item in span) { InnerBuilder.Append(Convert(item)); } return(this as TBuilder); }
/// <summary> /// Append a date from a <see cref="DateTimeOffset"/> object to the array. /// </summary> /// <remarks> /// Note that to convert the supplied <paramref name="value"/> parameter to a date, it is first converted to /// UTC and the date then taken from the UTC date/time. Depending on the value of its /// <see cref="DateTimeOffset.Offset"/> property, this may not necessarily be the same as the date obtained by /// calling its <see cref="DateTimeOffset.Date"/> property. /// </remarks> /// <param name="value">Date to add.</param> /// <returns>Returns the builder (for fluent-style composition).</returns> public TBuilder Append(DateTimeOffset value) { InnerBuilder.Append(Convert(value)); return(this as TBuilder); }