Fix 0 year issue

This commit is contained in:
Kelvin
2024-03-05 00:05:46 +01:00
parent 35fe7f0e7a
commit e590bb4a19
2 changed files with 2 additions and 1 deletions
@@ -150,6 +150,7 @@ fun OffsetDateTime.toHumanNowDiffString(abs: Boolean = false) : String {
if(value >= secondsInYear) {
value = getNowDiffYears();
if(abs) value = abs(value);
value = Math.max(1, value);
unit = "year";
}
else if(value >= secondsInMonth) {