@@ -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 \c ode{\% OSn}, which for output gives the seconds
237238 truncated to \c ode{0 <= n <= 6} decimal places (and if \c ode{\% OS} is
238- not followed by a digit, it uses the setting of
239- \c ode{\l ink{getOption}("digits.secs")}, or if that is unset, \c ode{n =
240- 0}). Further, for \c ode{strptime} \c ode{\% OS} will input seconds
241- including fractional seconds. Note that \c ode{\% S} does not read
242- fractional parts on output.
239+ not followed by a digit, it uses \c ode{digits} unless that is
240+ \c ode{NULL}, when \c ode{n = 0}). Further, for \c ode{strptime}
241+ \c ode{\% OS} will input seconds including fractional seconds. Note that
242+ \c ode{\% 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 \c ode{\% } \e mph{are} conversion
@@ -307,7 +307,7 @@ strptime(x, format, tz = "")
307307 year. (On some platforms this works better after conversion to
308308 \c ode{"POSIXct"}. Some platforms only recognize hour or half-hour
309309 offsets for output.)%% strftime in macOS 13.
310-
310+
311311 Using \c ode{\% z} for input makes most sense with \c ode{tz = "UTC"}.
312312}
313313
@@ -426,7 +426,8 @@ stopifnot(identical(format(z2), as.character(z2)))
426426
427427## time with fractional seconds
428428z3 <- strptime("20/2/06 11:16:16.683", "\% d/\% m/\% y \% H:\% M:\% OS") \d onttest{
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}
430431op <- options(digits.secs = 3)
431432\d onttest{z3 # shows the 3 extra digits}
432433as.character(z3) # ditto
0 commit comments