I need to store Date in Persian (Jalali) date in MySQL. I'm using CodeIgniter. I need something like this:
$Date = Jalali_to_Georgian(1393,5,28) // Output: "2014/08/19"
Do I need to create a new library for this?
It's generally better to stick to existing libs rather than writing your own one. Try, for example, jDateTime or Gregorian-Jalali-Date-Convertor.
P.S. I never tried to use them myself, but first one looks much more solid.