Skip to content

Commit 6e483a6

Browse files
committed
Fix padding of month string
1 parent 3f3dbdb commit 6e483a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_plugins/news.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ def initialize(site,base,lang,year,month,posts)
4949
end
5050

5151
data['title'] = title.gsub(/%Y|%m|%B/, {
52-
'%Y' => @year.to_s, '%m' => @month, '%B' => MONTHS[@month]
52+
'%Y' => @year.to_s,
53+
'%m' => "%.2d" % @month,
54+
'%B' => MONTHS[@month]
5355
})
5456
data['year'] = year
5557
end

0 commit comments

Comments
 (0)