lib/hijri_umm_alqura.rb
def arabno_to_hindi(input)      
      arabic_to_hindi = {
        '9' => '٩',
        '8' => '٨',
        '7' => '٧',
        '6' => '٦',
        '5' => '٥',
        '4' => '٤',
        '3' => '٣',
        '2' => '٢',
        '1' => '١',
        '0' => '٠'
      }
      text = ""
      input = input.to_s.split("")
      input.each do |i|
        text+= arabic_to_hindi[i]
      end
      text
    end
def arabno_to_hindi(input)      
      arabic_to_hindi = {
        '9' => '٩',
        '8' => '٨',
        '7' => '٧',
        '6' => '٦',
        '5' => '٥',
        '4' => '٤',
        '3' => '٣',
        '2' => '٢',
        '1' => '١',
        '0' => '٠'
      }
      text = ""
      input = input.to_s.split("")
      input.each do |i|
        text+= arabic_to_hindi[i]
      end
      text
    end
def arabno_to_hindi ( input ) arabic_to_hindi = { '9' => '٩', '8' => '٨', '7' => '٧', '6' => '٦', '5' => '٥', '4' => '٤', '3' => '٣', '2' => '٢', '1' => '١', '0' => '٠' } text = "" input = input . to_s . split ( "" ) input . each do | i | text += arabic_to_hindi [ i ] end text end
Convert arabic numbers to hindi numbers
Convert arabic numbers to hindi numbers