Aufräumarbeitenund einige Formatierungen

This commit is contained in:
eichehome 2021-05-13 21:09:10 +02:00
parent d7bbfdea2b
commit 040319dcbb
11 changed files with 238 additions and 127 deletions

30
src/utils/Message.java Normal file
View file

@ -0,0 +1,30 @@
package utils;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
public class Message implements Serializable {
String username;
String message;
//String date = new SimpleDateFormat("dd-MM-yyyy").format(new Date());
LocalDateTime current = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);
String date = current.format(formatter);
public Message(String username, String message) {
this.username = username;
this.message = message;
//this.date = date;
}
@Override
public String toString() {
return "nickname=" + username
+ ", message=" + message
+ ", time=" + date;
}
}