Skip to content

Commit

Permalink
Merge pull request #1691 from novasamatech/fix/past-dates-crashes
Browse files Browse the repository at this point in the history
Fixed past dates crashes
  • Loading branch information
antonijzelinskij authored Oct 11, 2024
2 parents 9b568d5 + de29966 commit 166755d
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ fun Date.formatDateSinceEpoch(resourceManager: ResourceManager): String {
val currentDays = System.currentTimeMillis().daysFromMillis()
val diff = currentDays - time.daysFromMillis()

if (diff < 0) throw IllegalArgumentException("Past date should be less than current")
return when (diff) {
0L -> resourceManager.getString(R.string.today)
1L -> resourceManager.getString(R.string.yesterday)
Expand Down

0 comments on commit 166755d

Please sign in to comment.