The TimeIndex class in the 'fame' package handles this kind of stuff with ease. > library(fame) > ym <- 200212 > z <- lastDayOf(ti(100*ym + 1, tif = "monthly")) > z [1] 20021231 class: ti > tifName(z) [1] "daily" a 'ti' object is a TimeIndex, and it has a tif (TimeIndexFrequency) embedded in it. -- Jeff