From 51671fdb430ff5a4ef2b5ed7c52ff22c56accf08 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 30 Jan 2021 21:06:29 +0000 Subject: [PATCH] add SimpleDate.toString() --- app/src/main/java/net/ktnx/mobileledger/utils/SimpleDate.java | 4 ++++ 1 file changed, 4 insertions(+) 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); + } } -- 2.39.5