Skip to content

Commit

Permalink
Add leading zero
Browse files Browse the repository at this point in the history
  • Loading branch information
markbrough committed May 19, 2017
1 parent 9e97232 commit 87cc4b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scraper.py
Expand Up @@ -19,9 +19,12 @@ def get_page():

def clean_fy(value):
value = value.strip()
if value == "calendar year": return "1 January"
if value == "calendar year": return "01 January"
if value == "NA": return "Unknown"
fy_start, fy_end = value.split("-")
day, month = fy_start.split(" ")
if len(day)==1:
return "0{} {}".format(day, month)
return fy_start

def init_git_repo():
Expand Down

0 comments on commit 87cc4b6

Please sign in to comment.