From: Damyan Ivanov Date: Sat, 30 Jan 2021 21:06:29 +0000 (+0000) Subject: add SimpleDate.toString() X-Git-Tag: v0.17.0~195 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=51671fdb430ff5a4ef2b5ed7c52ff22c56accf08;p=mobile-ledger.git add SimpleDate.toString() --- diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/SimpleDate.java b/app/src/main/java/net/ktnx/mobileledger/utils/SimpleDate.java index 51cf2532..52db9bdd 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/SimpleDate.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/SimpleDate.java @@ -22,6 +22,7 @@ import androidx.annotation.Nullable; import java.util.Calendar; import java.util.Date; +import java.util.Locale; public class SimpleDate implements Comparable { public final int year; @@ -96,4 +97,7 @@ public class SimpleDate implements Comparable { calendar.set(year, month, day); return calendar; } + public String toString() { + return String.format(Locale.US, "%d-%02d-%02d", year, month, day); + } }