[New] Added Version.getCreatedZdt() and Version.getUpdatedZdt()
This commit is contained in:
parent
8f1966fad4
commit
bdca6998f4
|
@ -1,6 +1,8 @@
|
|||
package li.strolch.model;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import li.strolch.utils.dbc.DBC;
|
||||
|
@ -154,6 +156,15 @@ public class Version {
|
|||
return this.created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date when this version was created
|
||||
*
|
||||
* @return the date when this version was created
|
||||
*/
|
||||
public ZonedDateTime getCreatedZdt() {
|
||||
return ZonedDateTime.ofInstant(this.created.toInstant(), ZoneId.systemDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date when this version was update
|
||||
*
|
||||
|
@ -163,6 +174,15 @@ public class Version {
|
|||
return this.updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date when this version was update
|
||||
*
|
||||
* @return the date when this version was update
|
||||
*/
|
||||
public ZonedDateTime getUpdatedZdt() {
|
||||
return ZonedDateTime.ofInstant(this.updated.toInstant(), ZoneId.systemDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this version was deleted, otherwise false
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue