diff --git a/grmi/Date.go b/grmi/Date.go index 7e1ae34..046a4bc 100644 --- a/grmi/Date.go +++ b/grmi/Date.go @@ -39,3 +39,11 @@ func (self *Date) ToString() string { date := self.Restore() return date.Format(DateOutFormat) } + +func (self *Date) String() string { + if self == nil { + return "" + } + date := self.Restore() + return date.Format(DateTimeOutFormat) +} diff --git a/grmi/DateTime.go b/grmi/DateTime.go index 01d0594..6f727c4 100644 --- a/grmi/DateTime.go +++ b/grmi/DateTime.go @@ -39,3 +39,11 @@ func (self *DateTime) ToString() string { date := self.Restore() return date.Format(DateTimeOutFormat) } + +func (self *DateTime) String() string { + if self == nil { + return "" + } + date := self.Restore() + return date.Format(DateTimeOutFormat) +} diff --git a/grmi/Time.go b/grmi/Time.go index 54e9331..9136fb0 100644 --- a/grmi/Time.go +++ b/grmi/Time.go @@ -35,3 +35,11 @@ func (self *Time) ToString() string { date := self.Restore() return date.Format(TimeOutFormat) } + +func (self *Time) String() string { + if self == nil { + return "" + } + date := self.Restore() + return date.Format(DateTimeOutFormat) +}