(self, val, label=None)
| 426 | return 1 <= value <= monthrange(year, month)[1] |
| 427 | |
| 428 | def append(self, val, label=None): |
| 429 | if hasattr(val, '__len__'): |
| 430 | if val.isdigit() and len(val) > 2: |
| 431 | self.century_specified = True |
| 432 | if label not in [None, 'Y']: # pragma: no cover |
| 433 | raise ValueError(label) |
| 434 | label = 'Y' |
| 435 | elif val > 100: |
| 436 | self.century_specified = True |
| 437 | if label not in [None, 'Y']: # pragma: no cover |
| 438 | raise ValueError(label) |
| 439 | label = 'Y' |
| 440 | |
| 441 | super(self.__class__, self).append(int(val)) |
| 442 | |
| 443 | if label == 'M': |
| 444 | if self.has_month: |
| 445 | raise ValueError('Month is already set') |
| 446 | self.mstridx = len(self) - 1 |
| 447 | elif label == 'D': |
| 448 | if self.has_day: |
| 449 | raise ValueError('Day is already set') |
| 450 | self.dstridx = len(self) - 1 |
| 451 | elif label == 'Y': |
| 452 | if self.has_year: |
| 453 | raise ValueError('Year is already set') |
| 454 | self.ystridx = len(self) - 1 |
| 455 | |
| 456 | def _resolve_from_stridxs(self, strids): |
| 457 | """ |
no outgoing calls