FYI I'm implementing date_trunc based transforms in this patch: https://github.com/django/django/pull/6243
Since the transform names "__month" "__year" etc are already taken by the Extract based transforms I've not yet implemented a lookup_name so that they can be used on the left hand side of filters (.filter(created__monthtrunc=..). If there is a decent proposal for trunc based lookup names, it'll be very easy to add them on. So here's my request for proposal. Are there any good lookup names that we can give trunc based date transformations? If there are no good suggestions before this is ready for commit, that's ok. We can always add lookup_name properties at a later datetime (sorry). Cheers On Friday, 4 March 2016 10:08:47 UTC+11, Josh Smeaton wrote: > > A somewhat related ticket: https://code.djangoproject.com/ticket/25774 > which attempts to make current datetime transforms/expressions public. > These focus mainly on EXTRACT() type transformations, but there's certainly > a place for date_trunc type transformations too. Feel free to create a > ticket proposing such expressions if one does not already exist. > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/20ba3084-559a-49d9-b7ff-6de45639ded6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.