Skip to content

Commit d3e7af2

Browse files
Only accept full-precision ISO dates
1 parent f2a7713 commit d3e7af2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sc2ts/metadata.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def date_sample_counts(self):
8080
counts = collections.Counter()
8181
with self.conn:
8282
for row in self.conn.execute(sql):
83-
counts[row["date"]] = row["COUNT(*)"]
83+
date = row["date"]
84+
if len(date) == 10 and date.startswith("20"):
85+
counts[date] = row["COUNT(*)"]
8486
return counts
8587

8688
def get_days(self, date=None):

0 commit comments

Comments
 (0)