| 57 | # #659 regression test |
| 58 | >>> import datetime |
| 59 | >>> p = Party.objects.create(when = datetime.datetime(1999, 12, 31)) |
| 60 | >>> p = Party.objects.create(when = datetime.datetime(1998, 12, 31)) |
| 61 | >>> p = Party.objects.create(when = datetime.datetime(1999, 1, 1)) |
| 62 | >>> [p.when for p in Party.objects.filter(when__month = 2)] |
| 63 | [] |
| 64 | >>> [p.when for p in Party.objects.filter(when__month = 1)] |
| 65 | [datetime.date(1999, 1, 1)] |
| 66 | >>> [p.when for p in Party.objects.filter(when__month = 12)] |
| 67 | [datetime.date(1999, 12, 31), datetime.date(1998, 12, 31)] |
| 68 | >>> [p.when for p in Party.objects.filter(when__year = 1998)] |
| 69 | [datetime.date(1998, 12, 31)] |
| 70 | |