globalgov / messydates

R package for Extended Date/Time Format (EDTF)
https://globalgov.github.io/messydates
Other
15 stars 1 forks source link

Fix issues with conversion and expansion of incomplete ranges and sets of dates #48

Closed henriquesposito closed 2 years ago

henriquesposito commented 2 years ago

e.g. expand(as_messydate(c("200 BC:100 BC", "100 BC:1 AD", "1 AD:150 AD", "150 AD:200 AD", "200, 300, 400")))

henriquesposito commented 2 years ago

Zero padding for incomplete date ranges and sets of dates is also being added so that expansion is facilitated and avoids errors (i.e. "-28..-14" should be "-0028..-0014" as well as "{200, 300, 400}" should be "{0200, 0300, 0400}").