Skip to content

Commit 489066b

Browse files
author
maechler
committed
forgotten update for r81968: digits is used
git-svn-id: https://svn.r-project.org/R/trunk@87350 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 3560b60 commit 489066b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/library/base/man/strptime.Rd

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ strptime(x, format, tz = "")
3939
methods is
4040
\code{"\%Y-\%m-\%d \%H:\%M:\%S"} if any element has a time
4141
component which is not midnight, and \code{"\%Y-\%m-\%d"}
42-
otherwise. If \code{\link{options}("digits.secs")} is set, up to
42+
otherwise. If \code{digits} is not \code{NULL}, i.e., by default when
43+
\code{\link{options}("digits.secs")} is set, up to
4344
the specified number of digits will be printed for seconds.}
4445
\item{\dots}{further arguments to be passed from or to other methods.}
4546
\item{usetz}{logical. Should the time zone abbreviation be appended
@@ -235,11 +236,10 @@ strptime(x, format, tz = "")
235236
236237
Specific to \R is \code{\%OSn}, which for output gives the seconds
237238
truncated to \code{0 <= n <= 6} decimal places (and if \code{\%OS} is
238-
not followed by a digit, it uses the setting of
239-
\code{\link{getOption}("digits.secs")}, or if that is unset, \code{n =
240-
0}). Further, for \code{strptime} \code{\%OS} will input seconds
241-
including fractional seconds. Note that \code{\%S} does not read
242-
fractional parts on output.
239+
not followed by a digit, it uses \code{digits} unless that is
240+
\code{NULL}, when \code{n = 0}). Further, for \code{strptime}
241+
\code{\%OS} will input seconds including fractional seconds. Note that
242+
\code{\%S} does not read fractional parts on output.
243243
244244
The behaviour of other conversion specifications (and even if other
245245
character sequences commencing with \code{\%} \emph{are} conversion
@@ -307,7 +307,7 @@ strptime(x, format, tz = "")
307307
year. (On some platforms this works better after conversion to
308308
\code{"POSIXct"}. Some platforms only recognize hour or half-hour
309309
offsets for output.)%% strftime in macOS 13.
310-
310+
311311
Using \code{\%z} for input makes most sense with \code{tz = "UTC"}.
312312
}
313313
@@ -426,7 +426,8 @@ stopifnot(identical(format(z2), as.character(z2)))
426426
427427
## time with fractional seconds
428428
z3 <- strptime("20/2/06 11:16:16.683", "\%d/\%m/\%y \%H:\%M:\%OS") \donttest{
429-
z3 # prints without fractional seconds by default, digits.sec = NULL ("= 0")}
429+
z3 # prints without fractional seconds by default, digits.sec = NULL ("= 0")
430+
print(z3, digits = 3) # shows extra digits}
430431
op <- options(digits.secs = 3)
431432
\donttest{z3 # shows the 3 extra digits}
432433
as.character(z3) # ditto

0 commit comments

Comments
 (0)