better handling of times and places..
Ted Unangst tedu@tedunangst.com
Sat, 05 Oct 2019 16:49:56 -0400
1 files changed,
7 insertions(+),
1 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -751,6 +751,8 @@ start, err := time.Parse(time.RFC3339, starttime)
if err == nil { t := new(Time) t.StartTime = start + endtime, _ := obj.GetString("endTime") + t.EndTime, _ = time.Parse(time.RFC3339, endtime) dura, _ := obj.GetString("duration") if strings.HasPrefix(dura, "PT") { dura = strings.ToLower(dura[2:])@@ -1045,7 +1047,11 @@ t["name"] = p.Name
t["latitude"] = p.Latitude t["longitude"] = p.Longitude t["url"] = p.Url - tags = append(tags, t) + if h.What == "event" { + jo["location"] = t + } else { + tags = append(tags, t) + } } if len(tags) > 0 { jo["tag"] = tags