I thought I would add this as an issue, hoping that some functionality like this is already in lubridate. I have what we call tenors in finance, examples are 1w 5d 10y etc. I think the months and days function serve this purpose however considering the ease-of-use nature of this library a convenience function would be great for converting these number-plus-span combinations into lubridate things. Let's call this function tenor for the sake of argument. The nature of this function would be such that
tenor('1d') = days(1)
tenor('1w') = weeks(1)
tenor('1m') = months(1)
tenor('1q') = quarters(1)
tenor('1y') = years(1)
Is there already something like this?
I thought I would add this as an issue, hoping that some functionality like this is already in lubridate. I have what we call tenors in finance, examples are
1w5d10yetc. I think themonthsanddaysfunction serve this purpose however considering the ease-of-use nature of this library a convenience function would be great for converting these number-plus-span combinations into lubridate things. Let's call this functiontenorfor the sake of argument. The nature of this function would be such thatIs there already something like this?