package main

import (
    "github.com/dustin/go-humanize"
    "time"
    "strings"
)

func HumanTime(time time.Time) string {
    original := humanize.Time(time)
    parts := strings.Split(original, " ")
    return parts[0] + " " + parts[1]
}

package main

import (
    "github.com/dustin/go-humanize"
    "time"
    "strings"
    "math"
)

func HumanTime(time time.Time) string {
    original := humanize.Time(time)
    parts := strings.Split(original, " ")
    length := int(math.Min(float64(len(parts)), 2)) // now / x minutes
    parts = parts[:length]
    return strings.Join(parts, " ")
}

Fix fatal error when pokemon expires “now”
Fix fatal error when pokemon expires “now”
