MzQCDateTime-class: An mzQC-formatted date+time in ISO8601 format, as required by...

MzQCDateTime-classR Documentation

An mzQC-formatted date+time in ISO8601 format, as required by the mzQC spec doc.

Description

The format is "%Y-%m-%dT%H:%M:%S".

Fields

datetime

A correctly formatted date time (use as read-only)

Examples

   dt1 = MzQCDateTime$new("1900-01-01")  ## yields "1900-01-01T00:00:00"
   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)))


rmzqc documentation built on May 29, 2024, 12:06 p.m.