diff --git a/libraries/dateformatter/api/src/main/kotlin/io/element/android/libraries/dateformatter/api/DateFormatter.kt b/libraries/dateformatter/api/src/main/kotlin/io/element/android/libraries/dateformatter/api/DateFormatter.kt index 4475ced912..5632962582 100644 --- a/libraries/dateformatter/api/src/main/kotlin/io/element/android/libraries/dateformatter/api/DateFormatter.kt +++ b/libraries/dateformatter/api/src/main/kotlin/io/element/android/libraries/dateformatter/api/DateFormatter.kt @@ -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, }