SimpleDateFormat Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SimpleDateFormat() |
Constructs a |
SimpleDateFormat(String) |
Constructs a |
SimpleDateFormat(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
SimpleDateFormat(String, DateFormatSymbols) |
Constructs a |
SimpleDateFormat(String, Locale) |
Constructs a |
SimpleDateFormat()
Constructs a SimpleDateFormat
using the default pattern and
date format symbols for the default
java.util.Locale.Category#FORMAT FORMAT
locale.
[Android.Runtime.Register(".ctor", "()V", "")]
public SimpleDateFormat ();
- Attributes
Remarks
Constructs a SimpleDateFormat
using the default pattern and date format symbols for the default java.util.Locale.Category#FORMAT FORMAT
locale. <b>Note:</b> This constructor may not support all locales. For full coverage, use the factory methods in the DateFormat
class.
Java documentation for java.text.SimpleDateFormat.SimpleDateFormat()
.
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
SimpleDateFormat(String)
Constructs a SimpleDateFormat
using the given pattern and
the default date format symbols for the default
java.util.Locale.Category#FORMAT FORMAT
locale.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public SimpleDateFormat (string? pattern);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Text.SimpleDateFormat : string -> Java.Text.SimpleDateFormat
Parameters
- pattern
- String
the pattern describing the date and time format
- Attributes
Exceptions
if the pattern is null
.
if pattern
is not considered to be usable by this
formatter.
Remarks
Constructs a SimpleDateFormat
using the given pattern and the default date format symbols for the default java.util.Locale.Category#FORMAT FORMAT
locale. <b>Note:</b> This constructor may not support all locales. For full coverage, use the factory methods in the DateFormat
class.
This is equivalent to calling #SimpleDateFormat(String, Locale) SimpleDateFormat(pattern, Locale.getDefault(Locale.Category.FORMAT))
.
Java documentation for java.text.SimpleDateFormat.SimpleDateFormat(java.lang.String)
.
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
SimpleDateFormat(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected SimpleDateFormat (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Text.SimpleDateFormat : nativeint * Android.Runtime.JniHandleOwnership -> Java.Text.SimpleDateFormat
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
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
SimpleDateFormat(String, DateFormatSymbols)
Constructs a SimpleDateFormat
using the given pattern and
date format symbols.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/text/DateFormatSymbols;)V", "")]
public SimpleDateFormat (string? pattern, Java.Text.DateFormatSymbols? formatSymbols);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/text/DateFormatSymbols;)V", "")>]
new Java.Text.SimpleDateFormat : string * Java.Text.DateFormatSymbols -> Java.Text.SimpleDateFormat
Parameters
- pattern
- String
the pattern describing the date and time format
- formatSymbols
- DateFormatSymbols
the date format symbols to be used for formatting
- Attributes
Exceptions
if the pattern is null
.
if the pattern is invalid.
Remarks
Constructs a SimpleDateFormat
using the given pattern and date format symbols.
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
SimpleDateFormat(String, Locale)
Constructs a SimpleDateFormat
using the given pattern and
the default date format symbols for the given locale.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/util/Locale;)V", "")]
public SimpleDateFormat (string? pattern, Java.Util.Locale? locale);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/util/Locale;)V", "")>]
new Java.Text.SimpleDateFormat : string * Java.Util.Locale -> Java.Text.SimpleDateFormat
Parameters
- pattern
- String
the pattern describing the date and time format
- locale
- Locale
the locale whose date format symbols should be used
- Attributes
Exceptions
if the pattern is null
.
if the pattern is invalid.
Remarks
Constructs a SimpleDateFormat
using the given pattern and the default date format symbols for the given locale. <b>Note:</b> This constructor may not support all locales. For full coverage, use the factory methods in the DateFormat
class.
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.