Location: PHPKode > scripts > Jalali Calendar > jalali-calendar/farsi.function.php
<?php
function farsinum($str)
{
  if (strlen($str) == 1)
      $str = "0".$str;
  $out = "";
  for ($i = 0; $i < strlen($str); ++$i) {
    $c = substr($str, $i, 1); 
    $out .= pack("C*", 0xDB, 0xB0 + $c);
  }
  return $out;
}

function farsimonth($jmonth)
{
    switch ($jmonth) {
        case "01":
            return "فروردین";
        case "02":
            return "اردیبهشت";
        case "03":
            return "خرداد";
        case "04":
            return "تیر";
        case "05":
            return "مرداد";
        case "06":
            return "شهریور";
        case "07":
            return "مهر";
        case "08":
            return "آبان";
        case "09":
            return "آذر";
        case "10":
            return "دی";
        case "11":
            return "بهمن";
        case "12":
			return "اسفند";
	}
}
?>
Return current item: Jalali Calendar