ctimeToSeconds: Interpret a character string as a time interval

Description Usage Arguments Value Author(s) See Also Examples

Description

Interpret a character string as a time interval Strings are of the form MM:SS or HH:MM:SS.

Usage

1

Arguments

ctime

a character string (see ‘Details’.

Value

A numeric value, the number of seconds represented by the string.

Author(s)

Dan Kelley

See Also

See secondsToCtime(), the inverse of this.

Other things related to time: julianCenturyAnomaly(), julianDay(), numberAsHMS(), numberAsPOSIXct(), secondsToCtime(), unabbreviateYear()

Examples

1
2
3
4
library(oce)
cat("10      = ", ctimeToSeconds("10"), "s\n", sep="")
cat("01:04   = ", ctimeToSeconds("01:04"), "s\n", sep="")
cat("1:00:00 = ", ctimeToSeconds("1:00:00"), "s\n", sep="")

oce documentation built on March 28, 2021, 9:09 a.m.