aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/item.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed/item.go')
-rw-r--r--internal/feed/item.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/feed/item.go b/internal/feed/item.go
index bbf7668..8b747fb 100644
--- a/internal/feed/item.go
+++ b/internal/feed/item.go
@@ -3,6 +3,7 @@ package feed
import (
"encoding/base64"
"fmt"
+ "time"
"github.com/google/uuid"
"github.com/mmcdole/gofeed"
@@ -27,6 +28,20 @@ type item struct {
itemId uuid.UUID
}
+func (item *item) DateParsed() *time.Time {
+ if item.UpdatedParsed == nil || item.UpdatedParsed.IsZero() {
+ return item.PublishedParsed
+ }
+ return item.UpdatedParsed
+}
+
+func (item *item) Date() string {
+ if item.Updated == "" {
+ return item.Published
+ }
+ return item.Updated
+}
+
// Creator returns the name of the creating author.
func (item *item) Creator() string {
if item.Author != nil {
'>Fix handling of slots in /etc/portage/*René 'Necoro' Neumann2-2/+4 2009-08-11Fix package detailsRené 'Necoro' Neumann1-1/+1 2009-08-11Fix GPytage pluginRené 'Necoro' Neumann1-2/+2 2009-08-11Update translationRené 'Necoro' Neumann2-1112/+1120 2009-08-11Update changelogRené 'Necoro' Neumann1-0/+1 2009-08-10Fixed pt_BR translationAlberto Federman Neto1-2/+5 2009-08-10Add credits for translationRené 'Necoro' Neumann2-0/+2