func (a *atom10Entry) entryDate() time.Time {
	dateText := a.Published
	if dateText == "" {
		dateText = a.Updated
	}
	if dateText != "" {
		result, err := date.Parse(dateText)
		if err != nil {
			logger.Error("atom: %v (entry ID = %s)", err, a.ID)
			return time.Now()
		}
		return result
	}
	return time.Now()
}
Note: The published date represents the original creation date for YouTube feeds.
Example:
<published>2019-01-26T08:02:28+00:00</published>
<updated>2019-01-29T07:27:27+00:00</updated>
package atom  
import (
	"encoding/xml"
	"html"
	"strconv"
	"strings"
	"time"
	"miniflux.app/crypto"
	"miniflux.app/logger"
	"miniflux.app/model"
	"miniflux.app/reader/date"
	"miniflux.app/reader/media"
	"miniflux.app/url"
)
type atom10Feed struct {
	XMLName xml.Name      `xml:"http://www.w3.org/2005/Atom feed"`
	ID      string        `xml:"id"`
	Title   atom10Text    `xml:"title"`
	Author  atomPerson    `xml:"author"`
	Links   atomLinks     `xml:"link"`
	Entries []atom10Entry `xml:"entry"`
}
func (a *atom10Feed) Transform(baseURL string) *model.Feed {
	var err error
	feed := new(model.Feed)
	feedURL := a.Links.firstLinkWithRelation("self")
	feed.FeedURL, err = url.AbsoluteURL(baseURL, feedURL)
	if err != nil {
		feed.FeedURL = feedURL
	}
	siteURL := a.Links.originalLink()
	feed.SiteURL, err = url.AbsoluteURL(baseURL, siteURL)
	if err != nil {
		feed.SiteURL = siteURL
	}
	feed.Title = html.UnescapeString(a.Title.String())
	if feed.Title == "" {
		feed.Title = feed.SiteURL
	}
	for _, entry := range a.Entries {
		item := entry.Transform()
		entryURL, err := url.AbsoluteURL(feed.SiteURL, item.URL)
		if err == nil {
			item.URL = entryURL
		}
		if item.Author == "" {
			item.Author = a.Author.String()
		}
		if item.Title == "" {
			item.Title = item.URL
		}
		feed.Entries = append(feed.Entries, item)
	}
	return feed
}
type atom10Entry struct {
	ID        string     `xml:"id"`
	Title     atom10Text `xml:"title"`
	Published string     `xml:"published"`
	Updated   string     `xml:"updated"`
	Links     atomLinks  `xml:"link"`
	Summary   atom10Text `xml:"summary"`
	Content   atom10Text `xml:"http://www.w3.org/2005/Atom content"`
	Author    atomPerson `xml:"author"`
	media.Element
}
func (a *atom10Entry) Transform() *model.Entry {
	entry := new(model.Entry)
	entry.URL = a.Links.originalLink()
	entry.Date = a.entryDate()
	entry.Author = a.Author.String()
	entry.Hash = a.entryHash()
	entry.Content = a.entryContent()
	entry.Title = a.entryTitle()
	entry.Enclosures = a.entryEnclosures()
	entry.CommentsURL = a.entryCommentsURL()
	return entry
}
func (a *atom10Entry) entryTitle() string {
	return html.UnescapeString(a.Title.String())
}
func (a *atom10Entry) entryContent() string {
	content := a.Content.String()
	if content != "" {
		return content
	}
	summary := a.Summary.String()
	if summary != "" {
		return summary
	}
	mediaDescription := a.FirstMediaDescription()
	if mediaDescription != "" {
		return mediaDescription
	}
	return ""
}