commit 62efcdfed443239711910592e2d35cd955caea84
parent 4b9493cb035a83bb6bb3b90270c6960c93bd3a64
Author: Anthony Kong <kongakong@users.noreply.github.com>
Date: Mon, 13 Mar 2017 22:50:57 +1100
commands: Improve jekyll import date format
Allow both yyyy-mm-dd and yyyy-m-d formats in jekyll markdown
file names.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go
@@ -372,7 +372,7 @@ func parseJekyllFilename(filename string) (time.Time, string, error) {
return time.Now(), "", errors.New("filename not match")
}
- postDate, err := time.Parse("2006-01-02", r[0][1])
+ postDate, err := time.Parse("2006-1-2", r[0][1])
if err != nil {
return time.Now(), "", err
}