Description :
I have couple of functions that can be written in JavaScript and PHP aswell.
e.g
(a) Current datetime calculation and their subtraction
(b) String replace , extracting substring , checking for a position of character in string and many more
I can submit the data in two ways either I can perform all the calculations and functions on client side using JavaScript
OR
I can send all the raw data to php and do the exact same work in PHP there before saving it in the database.
My Question :
What should I focus on more and try to write as much as I can in either of the languages ?