UNPKG

polish-number-to-words

Version:

Spell numbers using words in Polish | Napisz liczbę słownie po polsku

19 lines (18 loc) 1.09 kB
/** * Converts a number representing a monetary value into Polish words. * By default, it uses "złoty/złote/złotych" and "grosz/grosze/groszy" as currency units. * * @param num The monetary value to convert (e.g., 12.50, -0.99). * @returns The full expression of the amount in Polish (e.g., "dwanaście złotych pięćdziesiąt groszy"). */ export declare function currencyToWordsPL(num: number): string; /** * Converts a number representing a monetary value into Polish words, * using custom word forms for the main and sub currency units. * * @param num The monetary value to convert (e.g., 12.50, -0.99). * @param currencyWords Word forms for the main currency in [singular, 2–4, 5+] form (e.g., ["euro", "euro", "euro"]). * @param groszeWords Word forms for the subcurrency in [singular, 2–4, 5+] form (e.g., ["cent", "centy", "centów"]). * @returns The full expression of the amount in Polish. */ export declare function currencyToWordsPL(num: number, currencyWords: [string, string, string], groszeWords: [string, string, string]): string;