jenkins-bot merged this change.
Add variable semester to archivebot
Adding variable semester to as a value to archivebot.py per user
request.
Bug: T192266
Change-Id: I7cbbedc094afe7cc6b9064b5faed7276d366b29a
---
M scripts/archivebot.py
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 471fca9..a0e229a 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -59,6 +59,7 @@
%(year)d year of the thread being archived
%(isoyear)d ISO year of the thread being archived
%(isoweek)d ISO week number of the thread being archived
+%(semester)d semester term of the year of the thread being archived
%(quarter)d quarter of the year of the thread being archived
%(month)d month (as a number 1-12) of the thread being archived
%(monthname)s localized name of the month above
@@ -659,6 +660,8 @@
lang),
'isoweek': to_local_digits(t.timestamp.isocalendar()[1],
lang),
+ 'semester': to_local_digits(
+ int(ceil(float(t.timestamp.month) / 6)), lang),
'quarter': to_local_digits(
int(ceil(float(t.timestamp.month) / 3)), lang),
'month': to_local_digits(t.timestamp.month, lang),
To view, visit change 437250. To unsubscribe, visit settings.