How to get the days since some time using groovy script?

Say, I have a field with date type, I know I can get the total million
seconds of the date since the epoch by doc['date'].date.getMillis(), but is
there a function to get the total days directly?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/97e0800f-34fb-4a43-a97f-c601dff1944e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.