Add doc and examples.
This commit is contained in:
parent
5e0e64f9c9
commit
d4b0e37a83
1 changed files with 32 additions and 2 deletions
|
|
@ -16,11 +16,41 @@ interface DateFormatter {
|
|||
}
|
||||
|
||||
enum class DateFormatterMode {
|
||||
/**
|
||||
* Full date and time.
|
||||
* Example:
|
||||
* "April 6, 1980 at 6:35 PM"
|
||||
* Format can be shorter when useRelative is true.
|
||||
* Example:
|
||||
* "6:35 PM"
|
||||
*/
|
||||
Full,
|
||||
|
||||
/**
|
||||
* Only month and year.
|
||||
* Example:
|
||||
* "April 1980"
|
||||
* "This month" can be returned when useRelative is true.
|
||||
* Example:
|
||||
* "This month"
|
||||
*/
|
||||
Month,
|
||||
|
||||
/**
|
||||
* Only day.
|
||||
* Example:
|
||||
* "Sunday 6 April"
|
||||
* "Today", "Yesterday" and day of week can be returned when useRelative is true.
|
||||
*/
|
||||
Day,
|
||||
// Time if same day, else date
|
||||
|
||||
/**
|
||||
* Time if same day, else date.
|
||||
*/
|
||||
TimeOrDate,
|
||||
// Only time whatever the day
|
||||
|
||||
/**
|
||||
* Only time whatever the day.
|
||||
*/
|
||||
TimeOnly,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue