Sdílet prostřednictvím


DateTimeFormatter.FormatTo(ITemporalAccessor, IAppendable) Method

Definition

Formats a date-time object to an Appendable using this formatter.

[Android.Runtime.Register("formatTo", "(Ljava/time/temporal/TemporalAccessor;Ljava/lang/Appendable;)V", "", ApiSince=26)]
public void FormatTo (Java.Time.Temporal.ITemporalAccessor? temporal, Java.Lang.IAppendable? appendable);
[<Android.Runtime.Register("formatTo", "(Ljava/time/temporal/TemporalAccessor;Ljava/lang/Appendable;)V", "", ApiSince=26)>]
member this.FormatTo : Java.Time.Temporal.ITemporalAccessor * Java.Lang.IAppendable -> unit

Parameters

temporal
ITemporalAccessor

the temporal object to format, not null

appendable
IAppendable

the appendable to format to, not null

Attributes

Remarks

Formats a date-time object to an Appendable using this formatter.

This outputs the formatted date-time to the specified destination. Appendable is a general purpose interface that is implemented by all key character output classes including StringBuffer, StringBuilder, PrintStream and Writer.

Although Appendable methods throw an IOException, this method does not. Instead, any IOException is wrapped in a runtime exception.

Java documentation for java.time.format.DateTimeFormatter.formatTo(java.time.temporal.TemporalAccessor, java.lang.Appendable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to