From a10ec1c0f9f83e5da28f2d28ef592c8a95639b23 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Tue, 27 Jun 2023 16:12:59 +0200 Subject: [PATCH] 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. --- datetime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datetime.go b/datetime.go index b643c8c..755d30a 100644 --- a/datetime.go +++ b/datetime.go @@ -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) }