Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fix: zero pad months in table names
Browse files Browse the repository at this point in the history
(reapplied from 5ca85e0)

closes #768
  • Loading branch information
pjenvey authored and bbangert committed Feb 6, 2017
1 parent d537fd8 commit f7d7c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def make_rotating_tablename(prefix, delta=0):
"""Creates a tablename for table rotation based on a prefix with a given
month delta."""
date = get_month(delta=delta)
return "{}_{}_{}".format(prefix, date.year, date.month)
return "{}_{:04d}_{:02d}".format(prefix, date.year, date.month)


def table_maintenance(event, context):
Expand Down

0 comments on commit f7d7c1c

Please sign in to comment.