diff --git a/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt b/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt index a5f82c9bdd..aa23009ca9 100644 --- a/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt +++ b/commons/src/main/java/org/dhis2/commons/date/DateExtensions.kt @@ -98,6 +98,12 @@ fun Date?.toOverdueOrScheduledUiText( if (this == null) return "" val isOverdue: Boolean + if (printLog) { + println("Ferdy: this.time > currentDay.time is ${this.time > currentDay.time}") + println("Ferdy: this.time is ${this.time}") + println("Ferdy: currentDay.time is ${currentDay.time}") + } + val period = if (this.time > currentDay.time) { isOverdue = false Interval(currentDay.time, this.time) diff --git a/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt b/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt index cdf4ba4adf..f27112002b 100644 --- a/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt +++ b/commons/src/main/java/org/dhis2/commons/resources/ResourceManager.kt @@ -27,18 +27,8 @@ class ResourceManager( fun getPlural(@PluralsRes pluralResource: Int, quantity: Int) = getWrapperContext().resources.getQuantityString(pluralResource, quantity) - fun getPlural(@PluralsRes pluralResource: Int, quantity: Int, vararg arguments: Any) : String { - println( - "Ferdy getPlural: ${ - getWrapperContext().resources.getQuantityString( - pluralResource, - quantity, - *arguments - ) - }" - ) - return getWrapperContext().resources.getQuantityString(pluralResource, quantity, *arguments) - } + fun getPlural(@PluralsRes pluralResource: Int, quantity: Int, vararg arguments: Any) = + getWrapperContext().resources.getQuantityString(pluralResource, quantity, *arguments) fun formatWithEnrollmentLabel( programUid: String?,