@@ -93,16 +93,34 @@ doi: %s`, doi))...)
9393 src = append (src , []byte (fmt .Sprintf (`
9494version: %s` , cm .Version ))... )
9595 }
96+ now := time .Now ()
97+ dt := now .Format ("2006-01-02" )
9698 if cm .Name != "" {
9799 src = append (src , []byte (fmt .Sprintf (`
98100title: %s` , cm .Name ))... )
99101 }
102+ /*
103+ // This is code to supported created, modified dates when/if
104+ // they get added to CITATION.cff
105+ if cm.Created != "" {
106+ src = append(src, []byte(fmt.Sprintf(`
107+ date-created: %s`, cm.Created))...)
108+ } else {
109+ src = append(src, []byte(fmt.Sprintf(`
110+ date-created: %s`, dt))...)
111+ }
112+ if cm.Updated != "" {
113+ src = append(src, []byte(fmt.Sprintf(`
114+ date-updated: %s`, cm.Updated))...)
115+ } else {
116+ src = append(src, []byte(fmt.Sprintf(`
117+ date-updated: %s`, cm.Updated))...)
118+ }
119+ */
100120 if cm .Published != "" {
101121 src = append (src , []byte (fmt .Sprintf (`
102122date-released: %s` , cm .Published ))... )
103123 } else {
104- now := time .Now ()
105- dt := now .Format ("2006-01-02" )
106124 src = append (src , []byte (fmt .Sprintf (`
107125date-released: %s` , dt ))... )
108126 }
0 commit comments