mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Fix today still being displayed even though relative time is off (#5732)
This commit is contained in:
		| @@ -105,6 +105,9 @@ fun Date.toRelativeString( | ||||
|     range: Int = 7, | ||||
|     dateFormat: DateFormat = DateFormat.getDateInstance(DateFormat.SHORT) | ||||
| ): String { | ||||
|     if (range == 0) { | ||||
|         return dateFormat.format(this) | ||||
|     } | ||||
|     val now = Date() | ||||
|     val difference = now.time - this.time | ||||
|     val days = floor(difference / MILLISECONDS_IN_DAY).toInt() | ||||
| @@ -119,3 +122,5 @@ fun Date.toRelativeString( | ||||
|         else -> dateFormat.format(this) | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user