\Header{earliestEnd}{Start and End for Objects with Multiple Time Series}
\alias{earliestEndIndex}{earliestEnd}
\methalias{earliestEndIndex.default}{earliestEnd}
\methalias{earliestEndIndex.tframe}{earliestEnd}
\alias{earliestStart}{earliestEnd}
\alias{earliestStartIndex}{earliestEnd}
\methalias{earliestStartIndex.default}{earliestEnd}
\methalias{earliestStartIndex.tframe}{earliestEnd}
\alias{latestEnd}{earliestEnd}
\alias{latestEndIndex}{earliestEnd}
\methalias{latestEndIndex.default}{earliestEnd}
\methalias{latestEndIndex.tframe}{earliestEnd}
\alias{latestStart}{earliestEnd}
\alias{latestStartIndex}{earliestEnd}
\methalias{latestStartIndex.default}{earliestEnd}
\methalias{latestStartIndex.tframe}{earliestEnd}
\keyword{programming}{earliestEnd}
\keyword{utilities}{earliestEnd}
\keyword{ts}{earliestEnd}
\keyword{chron}{earliestEnd}
\begin{Description}\relax
Return start or end date (or index of the object) from multiple
time series objects.
\end{Description}
\begin{Usage}
\begin{verbatim}
    earliestEnd(x, ...)
    earliestEndIndex(x, ...)
    ## Default S3 method:
    earliestEndIndex(x, ...)
    ## S3 method for class 'tframe':
    earliestEndIndex(x, ...)

    earliestStart(x, ...)
    earliestStartIndex(x, ...)
    ## Default S3 method:
    earliestStartIndex(x, ...)
    ## S3 method for class 'tframe':
    earliestStartIndex(x, ...)

    latestEnd(x, ...)
    latestEndIndex(x, ...)
    ## Default S3 method:
    latestEndIndex(x, ...)
    ## S3 method for class 'tframe':
    latestEndIndex(x, ...)

    latestStart(x, ...)
    latestStartIndex(x, ...)
    ## Default S3 method:
    latestStartIndex(x, ...)
    ## S3 method for class 'tframe':
    latestStartIndex(x, ...)

\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A tframe or tframed object.
\item[\code{...}] Additional tframe or tframed objects.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions calculate the start
and end of each object in the argument and return a result by 
comparing across objects. Thus, latestStart returns the start date of
the object which starts latest and latestStartIndex returns the 
corresponding index of the object in the argument list.
\end{Details}
\begin{Value}
A date or index.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{tframe}}
\code{\Link{tfwindow}}
\code{\Link{tfTruncate}}
\code{\Link{trimNA}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
    t1<-ts(c(1,2,3,4,5), start=c(1991,1))
    t2<-ts(c(2,3,4,5,6,7,8), start=c(1992,1))
    t3<-ts(c(NA,2,3,4,5), start=c(1991,1))

    latestStart(t1,t2,t3)  # 1992 1 corresponding to the starting date of 
                            # the object which starts latest (t2)
    latestStart(t1,t3)     # both start in 1991 1 (NAs count as data)
    latestStart(tbind(t1,t2,t3)) # tbind gives a single object starting in 1991 1
    latestStart(t2, tbind(t1,t2,t3))

    latestStartIndex(t1,t2,t3)  # position of t2 in the argument list
\end{ExampleCode}
\end{Examples}

