diff options
author | rsiddharth <s@ricketyspace.net> | 2019-05-14 20:36:50 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-05-14 20:36:50 -0400 |
commit | 2287d4bcf51da75f74f89306e09ee1b79e518e98 (patch) | |
tree | 67a1ed5aad51e928a74a949088817b4f1b8a8952 /bin/news | |
parent | 42fae219fc43e516d7f443152038cdf70abd9790 (diff) |
bin/news: Add datefmt.
* bin/news (datefmt): New function.
Diffstat (limited to 'bin/news')
-rw-r--r-- | bin/news | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,7 @@ # Copyright © 2019 Free Software Foundation of India. # +import datetime import os import re import sys @@ -73,6 +74,10 @@ def template(type): return read('templates/{}.html'.format(type)) +def datefmt(d): + return datetime.datetime.strptime(d, '%Y%m%d').strftime('%B %d, %Y') + + def process(f): c = read(f.path) |