次の方法で共有


IChronoLocalDateTime.Format(DateTimeFormatter) Method

Definition

Formats this date-time using the specified formatter.

[Android.Runtime.Register("format", "(Ljava/time/format/DateTimeFormatter;)Ljava/lang/String;", "GetFormat_Ljava_time_format_DateTimeFormatter_Handler:Java.Time.Chrono.IChronoLocalDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual string? Format (Java.Time.Format.DateTimeFormatter? formatter);
[<Android.Runtime.Register("format", "(Ljava/time/format/DateTimeFormatter;)Ljava/lang/String;", "GetFormat_Ljava_time_format_DateTimeFormatter_Handler:Java.Time.Chrono.IChronoLocalDateTime, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Format : Java.Time.Format.DateTimeFormatter -> string
override this.Format : Java.Time.Format.DateTimeFormatter -> string

Parameters

formatter
DateTimeFormatter

the formatter to use, not null

Returns

the formatted date-time string, not null

Attributes

Remarks

Formats this date-time using the specified formatter.

This date-time will be passed to the formatter to produce a string.

The default implementation must behave as follows:

return formatter.format(this);

Java documentation for java.time.chrono.ChronoLocalDateTime.format(java.time.format.DateTimeFormatter).

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