Subject: | Gotcha found when using ordinal and cardinal together |
Hello again,
When using NUMWORDS and ORD together in Lingua::EN::Inflect, the order they were used in did not matter:
say "NUWORDS to ORD: " . ORD(NUMWORDS('3'));
# NUWORDS to ORD: third
say "ORD to NUWORDS: " . NUMWORDS(ORD('3'));
# ORD to NUWORDS: third
However, in Lingua::EN::Inlfexion, the order cardinal and ordinal are used in does matter:
say "cardinal to ordinal: " . noun(noun('3')->cardinal)->ordinal;
# cardinal to ordinal: third
say "ordinal to cardinal: " . noun(noun('3')->ordinal)->cardinal;
# ordinal to cardinal: three
I do not know if this also affects using them together in inflect().
Again, I hope you are having a good day...
Lady Aleena