We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32a0101 commit 43e6064Copy full SHA for 43e6064
src/main/java/dev/personnummer/Personnummer.java
@@ -161,6 +161,11 @@ public Personnummer(String personnummer) throws PersonnummerException {
161
this(personnummer, new Options());
162
}
163
164
+ @Override
165
+ public String toString() {
166
+ return format();
167
+ }
168
+
169
/**
170
* Format the personal identity number into a valid string (YYMMDD-/+XXXX)
171
* If longFormat is true, it will include the century (YYYYMMDD-/+XXXX)
@@ -234,6 +239,5 @@ public boolean equals(Object obj) {
234
239
return Objects.equals(format(true), other.format(true));
235
240
236
241
237
-
238
242
243
0 commit comments