An mzQC-formatted date+time in ISO8601 format, as required by the mzQC spec doc.
Source:R/mzQC.R
MzQCDateTime.Rd
An mzQC-formatted date+time in ISO8601 format, as required by the mzQC spec doc.
An mzQC-formatted date+time in ISO8601 format, as required by the mzQC spec doc.
Methods
Examples
dt1 = MzQCDateTime$new("1900-01-01") ## yields "1900-01-01T00:00:00Z"
dt2 = MzQCDateTime$new(Sys.time())
## test faulty input
## errors with 'character string is not in a standard unambiguous format'
try(MzQCDateTime$new('lala'), silent=TRUE)
## test roundtrip conversion from/to JSON
dt2$fromData(jsonlite::fromJSON(jsonlite::toJSON(dt1)))
#> <MzQCDateTime>
#> Public:
#> clone: function (deep = FALSE)
#> datetime: 1900-01-01T00:00:00Z
#> fromData: function (data, context = "MzQCDateTime")
#> initialize: function (date = as.character(Sys.time()))
#> isValid: function (context = "MzQCDateTime")
#> self: MzQCDateTime, R6
#> set: function (date)
#> toJSON: function (...)