View source: R/generalFunctions.R
discount.time | R Documentation |
Function to count the number of years between dates according to Quantil's discount convention. A year is defined as the difference in one year, between two dates with the exact month and day. Meanwhile, partial years are defined as the quotient between the number of elapsed days within a year and the total number of days that make up that year. Total number of years between the two dates is then the sum between complete full years and the partial portion.
discount.time(tinitial, tfinal)
tinitial |
Initial date of analysis. |
tfinal |
Final date of analysis. |
There is an exception. For example, for initial date 29-February, a year is defined as the 28 of February of the next year. Meanwhile four years, is defined as 29 of February four years after.
Number of years between the specified dates.
discount.time(tinitial = "2024-07-13", tfinal = "2025-03-01")
discount.time(tinitial = "2024-02-29", tfinal = "2025-02-28")
discount.time(tinitial = "2024-02-29", tfinal = "2028-02-29")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.