NAME

Lingua::LAT::Num2Word - Number to word conversion in Latin

VERSION

version 0.2603300

Lingua::LAT::Num2Word is a module for converting numbers into their written representation in Latin. Converts whole numbers from 0 up to 999 999.

SYNOPSIS

use Lingua::LAT::Num2Word;

my $text = Lingua::LAT::Num2Word::num2lat_cardinal( 123 );
print $text || "sorry, can't convert this number into Latin.";

my $ord = Lingua::LAT::Num2Word::num2lat_ordinal( 3 );
print $ord;    # "tertius"

Functions Reference

num2lat_cardinal (positional)
1   num    number to convert
=>  str    converted string
    undef  if input number is not known

Convert number to Latin cardinal text representation. Only numbers from interval [0, 999_999] will be converted.

Latin uses subtractive forms for 8 and 9 of each decade (e.g. duodeviginti = 18, undeviginti = 19), with the notable exception of 98 which uses the additive form (nonaginta octo).

num2lat_ordinal (positional)
1   num    number to convert
=>  str    converted ordinal string
    undef  if input number is not known

Convert number to Latin ordinal text representation (masculine nominative singular). Only numbers from interval [1, 999_999] will be converted.

Uses subtractive forms for 8th and 9th of each decade (e.g. duodevicesimus = 18th, undevicesimus = 19th).

capabilities (void)
=>  hashref  hash of supported conversion types

Returns a hash reference indicating which conversion types are supported.

EXPORT_OK

num2lat_cardinal
num2lat_ordinal

AUTHORS

specification, maintenance:
  Richard C. Jelinek E<lt>rj@petamem.comE<gt>
maintenance, coding (2025-present):
  PetaMem AI Coding Agents

COPYRIGHT

Copyright (c) PetaMem, s.r.o. 2002-present

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as the Artistic License 2.0 or the BSD 2-Clause License. See the LICENSE file in the distribution for details.