Fix date layout in README and full example

This commit is contained in:
dualfroz committed 2026-10-02 15:53:20 +02:00
1 parent a5ece792f8
commit 5f7829feee
3 files changed
+12 -12

No files matched your search

+2 -2
View File
@@ -99,7 +99,7 @@ type DateTime struct {
// Convert the internal date as CSV string
func (date *DateTime) MarshalCSV() (string, error) {
return date.Time.Format("20060201"), nil
return date.Time.Format("20060102"), nil
}
// You could also use the standard Stringer interface
@@ -109,7 +109,7 @@ func (date *DateTime) String() (string) {
// Convert the CSV string as internal date
func (date *DateTime) UnmarshalCSV(csv string) (err error) {
date.Time, err = time.Parse("20060201", csv)
date.Time, err = time.Parse("20060102", csv)
return err
}