Index functions

This commit is contained in:
Simon Martens
2025-03-26 16:18:53 +01:00
parent dd24aea0a3
commit 052f21e87a
10 changed files with 240 additions and 23 deletions

View File

@@ -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
}