From 62efcdfed443239711910592e2d35cd955caea84 Mon Sep 17 00:00:00 2001 From: Anthony Kong Date: Mon, 13 Mar 2017 22:50:57 +1100 Subject: [PATCH] commands: Improve jekyll import date format Allow both yyyy-mm-dd and yyyy-m-d formats in jekyll markdown file names. --- commands/import_jekyll.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go index c33b68f2e..071257d7d 100644 --- 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 }