From 2b0d12a52d318f5a26f549c47522b073212335dc Mon Sep 17 00:00:00 2001 From: allanwei Date: Fri, 11 Mar 2022 11:12:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E5=B0=86=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=AF=BC=E5=87=BA=E5=88=B0Excel=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=E5=8F=91=E7=94=9F=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grmi/Date.go | 8 ++++++++ grmi/DateTime.go | 8 ++++++++ grmi/Time.go | 8 ++++++++ 3 files changed, 24 insertions(+) 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) +}