File: timeDate-midnightStandard.Rd

package info (click to toggle)
r-cran-timedate 3012.100-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,592 kB
  • ctags: 4
  • sloc: makefile: 13
file content (38 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
\name{midnightStandard}

\title{Midnight Standard}

\alias{midnightStandard}
\alias{midnightStandard2}

\description{
    Corrects 'timeDate' objects if they do not fulfill the
    ISO8601 midnight standard.

    \code{midnightStandard2()} relies on \code{\link{strptime}} wherever
    possible, and there simply returns
    \code{\link{as.POSIXct}(\link{strptime}(charvec, format, tz = "GMT"))}.
}
\usage{
midnightStandard (charvec, format)
midnightStandard2(charvec, format)
}
\arguments{
  \item{charvec}{a character string or vector of dates and times.}
  \item{format}{a string, the format specification of the input
    character vector.}
}

\value{
     \code{midnightStandard} returns a \code{character} and
     \code{midnightStandard2} a \code{\link{POSIXct}} object.
}


\examples{
   ch <- "2007-12-31 24:00"
   midnightStandard(ch)
   (ms2 <- midnightStandard2(ch))
   class(ms2)
}
\keyword{chron}