globalizejs / globalizejs/globalize

General purpose API for converting regular numerals to Hebrew ones

Open
#537 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.8k
Forks
585
PR merge metrics
No merged PRs in 30d

Description

According to Hebrew cultural conventions, in some cases
numbers are represented by letters of Hebrew alphabet, i. e.
instead of Arabic digits, the Hebrew characters having their numbering equivalent are used, like:
א in place of 1
ב in place of 2
..............
י in place of 10
כ in place of 20
................
י"א in place of 11
כ"א in place of 21
(However this rule isn't that straightforward since some Hebrew letters combinations are not acceptable from historic-religious reasons and they are substituted by their equivalents).
Fore detailed info please see:
http://en.wikipedia.org/wiki/Hebrew_numerals
http://www.i18nguy.com/unicode/hebrew-numbers.html
http://smontagu.org/writings/HebrewNumbers.html

The most common (but not the only one) use case is the days of month or year stamp, thus Hebrew date picker, for instance, will use כ"א instead of 21 day of month, and תשע"ו instead of 2015

The proposal is to provide functionality for algorithmic transformation of regular numbers to their Hebrew counterparts and vice verso, please note that this functionality has no dependencies on CLDR

I would consider either:
1. Utilization of existing 'numberFormatter' function from 'Number module' by adding 'option' value 'Hebrew' (for converting regular [Arabic] numbers to Hebrew) and 'option' value 'Regular' (or whatever) for opposite conversion.
or
2. Creating brand new function for this purpose.

What do you think? Which approach would be more appropriate?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.