finale version
This commit is contained in:
parent
74eca9c9b3
commit
1efd94af53
4 changed files with 2 additions and 1 deletions
Binary file not shown.
BIN
bin/Date.class
BIN
bin/Date.class
Binary file not shown.
|
@ -16,7 +16,7 @@ public class Co2Data {
|
||||||
public Co2Data(Date date, int co2Level) {
|
public Co2Data(Date date, int co2Level) {
|
||||||
this.date = date;
|
this.date = date;
|
||||||
this.co2Level = co2Level;
|
this.co2Level = co2Level;
|
||||||
this.time = date.getHour() * 100 + date.getMinute();
|
this.time = (date.getHour() * 100 + 100) + date.getMinute();
|
||||||
}
|
}
|
||||||
|
|
||||||
// #region Getters and Setters
|
// #region Getters and Setters
|
||||||
|
|
|
@ -72,6 +72,7 @@ public class Date {
|
||||||
|
|
||||||
// #region String Representation
|
// #region String Representation
|
||||||
// Method to print date in a readable format
|
// Method to print date in a readable format
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("%04d-%02d-%02d %02d:%02d", year, month, day, hour, minute);
|
return String.format("%04d-%02d-%02d %02d:%02d", year, month, day, hour, minute);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue