Date Time Functions in Algolia -




i have object in algolia -

{    …    “startdate”: “2013-09-26t00:00:00.000+05:30”,    “enddate”: “2017-10-25t10:08:44.000+05:30”,    … } 

now, while retrieving object want add field - “endingin”: “ending in 9 days”

“endingin” days remaining todays date till enddate. example:

val daysleft = days.daysbetween(datetime.now,datetime.parse(enddate)).getdays <br> val endingin = s"ending in $daysleft days" 

is possible?

thanks in advance.

you can use transformdata. doc :method used change object passed item template





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -