Class DateTimeConverter
UXML attribute converter for DateTime values, used by DateTimeField.
Inherited Members
Namespace: Unity.AppUI.Editor
Assembly: Unity.AppUI.Editor.dll
Syntax
public class DateTimeConverter : UxmlAttributeConverter<DateTime>
Methods
FromString(string)
Converts a UXML attribute value into a DateTime.
Declaration
public override DateTime FromString(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The attribute value to convert. |
Returns
| Type | Description |
|---|---|
| DateTime | The converted date and time, or the default value if it is empty or cannot be parsed. |
Overrides
ToString(DateTime)
Converts a DateTime into its UXML attribute representation.
Declaration
public override string ToString(DateTime value)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | value | The date and time to convert. |
Returns
| Type | Description |
|---|---|
| string | The date and time formatted using the invariant culture round-trip format. |