Skip to content

Commit b52be01

Browse files
changed method to User.java
1 parent 7746cdc commit b52be01

File tree

1 file changed

+4
-4
lines changed
  • src/main/java/telegram/bot/dto/basicStatistic

1 file changed

+4
-4
lines changed

src/main/java/telegram/bot/dto/basicStatistic/User.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ public class User {
1818

1919

2020
public String getCreatedAt() {
21-
try {
21+
if (this.createdAt.equals(NOT_PUBLIC.getMessage())) {
22+
return NOT_PUBLIC.getMessage();
23+
}
2224
var instant = java.time.Instant.parse(this.createdAt);
2325
var date = java.util.Date.from(instant);
2426
var formatter = new SimpleDateFormat("dd MMMMMMMM yyyy", Locale.ENGLISH);
27+
2528
return formatter.format(date);
26-
} catch (Exception e) {
27-
return NOT_PUBLIC.getMessage();
28-
}
2929
}
3030
}

0 commit comments

Comments
 (0)