Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

currentPeriod

Current Period Time Indexes


Description

Return a current ti of the desired frequency

Usage

currentWeek(xTi = today())
currentMonth(xTi = today())
currentQuarter(xTi = today())
currentHalf(xTi = today())
currentYear(xTi = today())
currentQ4(xTi = today())
currentQMonth(xTi = today())
currentJanuary(xTi = today())
currentFebruary(xTi = today())
currentMarch(xTi = today())
currentApril(xTi = today())
currentMay(xTi = today())
currentJune(xTi = today())
currentJuly(xTi = today())
currentAugust(xTi = today())
currentSeptember(xTi = today())
currentOctober(xTi = today())
currentNovember(xTi = today())
currentDecember(xTi = today())

Arguments

xTi

a ti object or something that the ti() function can turn into a ti object

Details

currentWeek returns the weekly ti for the week that its argument falls into. If the argument is itself a ti, the returned week contains the last day of the argument's period. The default weekly frequency is "wmonday" (Monday-ending weeks), so currentWeek always returns wmonday ti's. This can be changed via the setDefaultFrequencies function.

All of the other current{SomeFreq} functions work the same way, returning the ti's of tif SomeFreq that the last day of their arguments period falls into. The tif's for currentHalf and currentQ4 are "semiannual" and "quarterly", respectively. Finally, currentQMonth returns the quarter-ending month of the currentQuarter of its argument.

currentJanuary returns the monthly ti for January of the January-ending year that the last day of its argument falls into. currentFebruary returns the monthly ti for February of the February-ending year that the last day of its argument falls into, and so on.

Value

All return return ti objects as described in the details.

See Also


tis

Time Indexes and Time Indexed Series

v1.38
Unlimited
Authors
Jeff Hallman <jeffhallman@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.