mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-29 09:15:33 +00:00
Index functions
This commit is contained in:
@@ -17,3 +17,23 @@ type Date struct {
|
||||
Cert string `xml:"cert,attr"`
|
||||
Text string `xml:",chardata"`
|
||||
}
|
||||
|
||||
func (d *Date) Sort() *xmlparsing.XSDDate {
|
||||
if d.NotBefore.Validate() {
|
||||
return &d.NotBefore
|
||||
}
|
||||
if d.From.Validate() {
|
||||
return &d.From
|
||||
}
|
||||
if d.When.Validate() {
|
||||
return &d.When
|
||||
}
|
||||
if d.To.Validate() {
|
||||
return &d.To
|
||||
}
|
||||
if d.NotAfter.Validate() {
|
||||
return &d.NotAfter
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user