Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
5
date.go
5
date.go
@@ -18,7 +18,10 @@ func DateTime(t time.Time) string {
|
||||
|
||||
// NewDate creates a new Date. It returns a *Date.
|
||||
func NewDate(t time.Time) *Date {
|
||||
return &Date{DateTime: DateTime(t)}
|
||||
return &Date{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
DateTime: DateTime(t),
|
||||
}
|
||||
}
|
||||
|
||||
// Check checks the Date for incompatibilities with RFC4287. It returns an
|
||||
|
Reference in New Issue
Block a user