Fix Into<String> for DiaryId to contain padding zeroes

This commit is contained in:
Matthias Beyer 2016-06-07 20:00:29 +02:00
parent a29ea121a0
commit dc07abdd72

View file

@ -76,7 +76,7 @@ impl IntoStoreId for DiaryId {
impl Into<String> 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)
}