Class to compare dates specified as year-month-day to dates specified as days since epoch.
| 83 | |
| 84 | |
| 85 | class Date(): |
| 86 | """Class to compare dates specified as year-month-day to dates specified as days since |
| 87 | epoch. |
| 88 | """ |
| 89 | def __init__(self, year, month, day): |
| 90 | self.days_since_epoch = (date(year, month, day) - date(1970, 1, 1)).days |
| 91 | |
| 92 | def __eq__(self, other_days_since_eopch): |
| 93 | return self.days_since_epoch == other_days_since_eopch |
| 94 | |
| 95 | def __hash__(self): |
| 96 | return hash(self.days_since_epoch) |
| 97 | |
| 98 | |
| 99 | ColumnStats = namedtuple('ColumnStats', ['name', 'min', 'max', 'null_count']) |
no outgoing calls