@@ -93,16 +93,34 @@ doi: %s`, doi))...)
93
93
src = append (src , []byte (fmt .Sprintf (`
94
94
version: %s` , cm .Version ))... )
95
95
}
96
+ now := time .Now ()
97
+ dt := now .Format ("2006-01-02" )
96
98
if cm .Name != "" {
97
99
src = append (src , []byte (fmt .Sprintf (`
98
100
title: %s` , cm .Name ))... )
99
101
}
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
+ */
100
120
if cm .Published != "" {
101
121
src = append (src , []byte (fmt .Sprintf (`
102
122
date-released: %s` , cm .Published ))... )
103
123
} else {
104
- now := time .Now ()
105
- dt := now .Format ("2006-01-02" )
106
124
src = append (src , []byte (fmt .Sprintf (`
107
125
date-released: %s` , dt ))... )
108
126
}
0 commit comments