Represents an Italian fiscal code (Codice Fiscale). This value class ensures a proper FiscalCode format through validation upon initialization.
A FiscalCode is a unique alphanumeric identifier used in Italy for tax purposes. It consists of 16 characters and must comply with the specific pattern:
Instances are immutable and validated to ensure compliance with the above format. The class provides several utility operations such as subSequence and conversion utilities.
The underlying string value is always stored in uppercase form.
<aside> <img src="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" alt="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" width="40px" />
TABLE OF CONTENT
</aside>
| Package | ‣ dev.tommasop1804.italyutils.classes |
|---|---|
| Since version | 2026-02.1 |
| Implemented interface | ‣ CharSequence |
| Serialization | • tools.jackson |
• com.fasterxml.jackson |
|
| Deserialization | • tools.jackson |
• com.fasterxml.jackson |
|
| Database converter | JPA (auto applied) |
| Value class | :ij-kt-class: String |
| Type-Aliases | • CF |
• CodiceFiscale |
birthDate| Since version | 2026-02.1 |
|---|---|
| Type | ‣ LocalDate |
| Dinamically computed | ✔️ |
| Opt-In | $\red{\bullet}\ \textsf{ERROR}$ ‣ dev.tommasop1804.italyutils.annotations.UnreliableYear |
Retrieves the birth date as a pair consisting of the year of birth and the day and month.