rntrc - v1.1.0
    Preparing search index...

    Class Rntrc

    Represents an RNTRC (Ukrainian personal tax identifier with embedded information about birthdate and gender).

    Index

    Constructors

    • Creates a new RNTRC instance

      Parameters

      • rntrc: string | number

        The RNTRC number

      • OptionalignoreInvalid: boolean

        Whether to skip validation of the RNTRC number

      Returns Rntrc

      If the RNTRC is invalid and ignoreInvalid is false, or RNTRC isn't 10 digits.

    Methods

    • Gets sequential number of the Облікова картка № 1ДР

      Returns string

      The sequential number from RNTRC

    • Gets the birthdate encoded in the RNTRC

      Returns Date

      The birthdate

    • Checks if the RNTRC belongs to a female person

      Returns boolean

      True if female, false otherwise

    • Gets the gender encoded in the RNTRC

      Returns Gender

      The gender ('male' or 'female')

    • Checks if the RNTRC belongs to a male person

      Returns boolean

      True if male, false otherwise

    • Gets the RNTRC number string.

      Returns string

      RNTRC number string

    • Validates the RNTRC number

      Returns boolean

      True if the RNTRC is valid, false otherwise

    • Generate a random RNTRC instance.

      Generates a valid RNTRC based on the provided parameters. If parameters are not provided, random valid values will be used. The generated RNTRC will include a birthdate between 1900-01-01 and 2173-10-14, a random record number and a gender digit based on the specified or random gender.

      Parameters

      • params: GenerateParams = {}

        Configuration object for RNTRC generation

        Parameters for generating a RNTRC number.

        • Optionalday?: string | number

          Day of birth

        • Optionalgender?: Gender

          Gender of the person

        • Optionalmonth?: string | number

          Month of birth

        • Optionalyear?: string | number

          Year of birth

      Returns Rntrc

      A new valid RNTRC instance

      If date is invalid or outside allowed range

      If gender value is invalid