Skip to content

Finance use case - tenor conversions to time spans #459

Description

@waynenilsen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions