formatHebrewNumber

fun formatHebrewNumber(number: Int): String

Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999.

  • Single digit numbers such as 3, 30 and 100 will be returned with a ׳ (Geresh) appended as at the end. For example ג׳, ל׳ and ק׳

  • multi digit numbers such as 21 and 769 will be returned with a ״ (Gershayim) between the second to last and last letters. For example כ״א, תשכ״ט

  • 15 and 16 will be returned as ט״ו and ט״ז

  • Single digit numbers (years assumed) such as 6000 (%1000=0) will be returned as ו׳ אלפים

  • 0 will return אפס

Return

the Hebrew formatted number such as תשכ״ט

Parameters

number

the number to be formatted. It will trow an IllegalArgumentException if the number is < 0 or 9999.

See also


fun formatHebrewNumber(number: Long): String