From dc07abdd72f56997d1e582dea530a004def4bb00 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 7 Jun 2016 20:00:29 +0200 Subject: [PATCH] Fix Into for DiaryId to contain padding zeroes --- libimagdiary/src/diaryid.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libimagdiary/src/diaryid.rs b/libimagdiary/src/diaryid.rs index 2386e2d3..c2066506 100644 --- a/libimagdiary/src/diaryid.rs +++ b/libimagdiary/src/diaryid.rs @@ -76,7 +76,7 @@ impl IntoStoreId for DiaryId { impl Into for DiaryId { fn into(self) -> String { - format!("{}/{}/{}/{}/{}:{}", + format!("{}/{:0>4}/{:0>2}/{:0>2}/{:0>2}:{:0>2}", self.name, self.year, self.month, self.day, self.hour, self.minute) }