Update DateTime String method to use Value()
Refactor the DateTime String method to use the Value() function instead of accessing the internal field directly, for better encapsulation and readability.
This commit is contained in:
parent
d7567d4b2b
commit
a10ec1c0f9
|
@ -36,5 +36,5 @@ func (dt DateTime) Value() time.Time {
|
|||
// String satisfies the fmt.Stringer interface for the DateTime type
|
||||
// The date will returned as time.RFC3339 format
|
||||
func (dt DateTime) String() string {
|
||||
return dt.dv.Format(time.RFC3339)
|
||||
return dt.Value().Format(time.RFC3339)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue