4 ms·
Off the top of my head I can't think of a reason to check if a date exists, but I would certainly expect midnight to be truthy if I found a reason.
by dec0dedab0de 13y ago
Off the top of my head I can't think of a reason to check if a date exists, but I would certainly expect midnight to be truthy if I found a reason.
- ojii 13y agoIn Django you might have a nullable TimeField and check if it's set via "if obj.time_field".
- calpaterson 13y agoI always write "if x is None", trying to be explicit.
- danielsamuels 13y agoWhat about optional date fields in a Django application?
- isaacremuant 13y agoyou check if it's None or for the type.