ijt / go-anytime

Parse natural and standardized dates/times and ranges in Go without knowing the format in advance
MIT License
23 stars 2 forks source link

Replace* funcs don't preserve spaces #43

Closed ijt closed 1 year ago

ijt commented 1 year ago

For example

s := "next week I'd like to set up a Japan trip from Jan 21st to Feb 15th just like the one from last year."
got, err := ReplaceRangesByFunc(s, now, func(r Range) string { return "RANGE" })

gives back an answer with incorrect whitespace.

ijt commented 1 year ago

This is no longer an issue in v2.