Skip to content

Commit 4a35bec

Browse files
Merge pull request #254 from jeromekelleher/filter-real-dates
Only accept full-precision ISO dates
2 parents f2a7713 + d3e7af2 commit 4a35bec

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)