Merge pull request #17 from nwin/fix-column-alignment

Fix the column alignment
This commit is contained in:
Ben S 2015-02-22 23:48:30 +00:00
commit bd8e73b212
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ impl Cell {
pub fn paint(style: Style, string: &str) -> Cell {
Cell {
text: style.paint(string).to_string(),
length: string.len(),
length: string.width(false),
}
}
}

View File

@ -319,7 +319,7 @@ impl<'a> File<'a> {
DateFormat::parse("{2>:D} {:M} {2>:h}:{02>:m}").unwrap()
}
else {
DateFormat::parse("{2>:D} {:M} {4>:Y}").unwrap()
DateFormat::parse("{2>:D} {:M} {5>:Y}").unwrap()
};
Cell::paint(Blue.normal(), format.format(date, locale).as_slice())