fsfi

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2287d4bcf51da75f74f89306e09ee1b79e518e98
parent 42fae219fc43e516d7f443152038cdf70abd9790
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 14 May 2019 20:36:50 -0400

bin/news: Add datefmt.

* bin/news (datefmt): New function.

Diffstat:
bin/news | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/bin/news b/bin/news @@ -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)