func (v *View) FormatTime_2(bid bson.ObjectId) string { now := time.Now() t := bid.Time() duration := now.Sub(t) if duration.Hours() < 24 { return t.Format("15:04") } return t.Format("01-02") }
func (g *View) FormatTime(bid bson.ObjectId) string { return bid.Time().Format("2006-01-02 15:04") }