NAME

Lingua::DAN::Num2Word - Number to word conversion in Danish

VERSION

version 0.2603270

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

Text is encoded in UTF-8.

SYNOPSIS

use Lingua::DAN::Num2Word;

my $text = Lingua::DAN::Num2Word::num2dan_cardinal( 123 );
print $text || "sorry, can't convert this number into danish language.";

my $ord = Lingua::DAN::Num2Word::num2dan_ordinal( 3 );
print $ord;    # "tredje"

Functions Reference

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

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

num2dan_ordinal (positional)
1   num    number to convert (1 .. 999_999_999)
=>  str    converted ordinal string

Convert number to its Danish ordinal text representation. Handles irregular forms (første, anden, tredje, etc.) and applies correct suffixes for regular forms.

EXPORT_OK

num2dan_cardinal
num2dan_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.