This function returns the date array of selected observations, in the requested print format. Dates will be provided accordingly to the BIMETS configuration option BIMETS_CONF_DIP
x: Input time series that must satisfy the compliance control check defined in is.bimets.
index: Index of observations to be selected. The output dates will be the dates of the selected observations. If index=NULL this function will retrieve all available dates in the input time series.
format: Output print format, provided as a paste of the following codes:
%Y : 4 digits year
%y : 2 digits year
%j : period in the year for daily time series
%q : quarter index, available only if also %y or %Y have been requested
%m : 2 digits month
%b : 3 digits month
%B : full month name
%d : 2 digits day
%a : 3 letters weekday
%A : full weekday name
avoidCompliance: If TRUE, compliance control check of input time series will be skipped. See is.bimets
...: Backward compatibility.
Returns
This function returns the date array of selected observations, in the requested print format.
See Also
BIMETS configuration
BIMETS indexing
yq2yp
ym2yp
date2yp
LOCS
NAMELIST
TSLOOK
TABIT
ELIMELS
Examples
#day and month names can change depending on localeSys.setlocale('LC_ALL','C')Sys.setlocale('LC_TIME','C')#work on xtssetBIMETSconf('BIMETS_CONF_CCT','XTS')#XTS yearlyn<-10xArr<-(n:1)dateArr<-seq(as.Date('2000-12-31'),by='year',length=n)dataF<-data.frame(dateArr,xArr)ts1<-xts(dataF[,2],order.by=dataF[,1])ts1[5]<-NAprint(GETDATE(ts1,5))#...print 2004-12-31print(GETDATE(ts1,5,'%A %d %b %Y'))#print... Friday 31 Dec 2004print(GETDATE(ts1))#print... "2000-12-31" "2001-12-31" ... "2009-12-31"#XTS quarterlyn<-15xArr<-(n:0)dateArr<-as.yearqtr('2000 Q1')+0:n/4dataF<-data.frame(dateArr,xArr)ts1<-xts(dataF[,2],order.by=dataF[,1])print(GETDATE(ts1,9,'%b %Y'))#print...Mar 2002 #XTS monthly#set configuration BIMETS_CONF_DIP to FIRSTsetBIMETSconf('BIMETS_CONF_DIP','FIRST')n<-15xArr<-(n:0)dateArr<-as.yearmon('Jan 2000')+0:n/12dataF<-data.frame(dateArr,xArr)ts1<-xts(dataF[,2],order.by=dataF[,1])print(GETDATE(ts1,9,'%b %Y'))#print...Sep 2000 #set configuration BIMETS_CONF_DIP to LASTsetBIMETSconf('BIMETS_CONF_DIP','LAST')#2000 is bissextile... print(GETDATE(ts1,2))#print... 2000-02-29#quarter...print(GETDATE(ts1,5,'%Y Q%q'))#print... 2000 Q2#restore defaultsetBIMETSconf('BIMETS_CONF_CCT','TS')