This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I have used the Datatables for my website. I was able to filter the data with PHP. Instead of the output shown above, I was thinking of getting the difference of the these two dates×, like {{ "now"|date("Y-m-d H:i:s") }} - {{ appointment.appointmentscontacted|last.datetime }} for me to get the duration. Should it be done inside the PHP, jQuery or in HTML? Please advise, I'm a newbie. Thank you!
Last updated
I prefer the Twig |date
filter because it can be more predictable and reliable, but its up to you. October CMS comes up a powerful Carbon library that can be useful for working with dates in PHP as well.
1-2 of 2