Timestamp | R Documentation |
Create and work with timestamps
FormatTime(time, locale = TRUE, tz = "UTC", format = TSFormats(type = "R"))
Timestamp(tz = "UTC", format = TSFormats(type = "R"))
TSFormats(type = c("R", "loom"))
time |
A character timestamp |
locale |
Change the timestamp of to the timezone of the locale as
determined by |
tz |
A character string specifying the time zone to be used for
the conversion. System-specific (see |
format |
A character string. The default for the |
type |
Type of format to get, currently supports the following formats:
See Timestamp formats below for more details |
FormatTime
: A character with the formated timestamp
Timestamp
:A character with the current time in the
specified format
TSFormats
: Format for a specified type
The following formats can be provided by TSFormats
:
A 24-hour R-friendly format; stores date/time information as the following:
Four-digit year (eg. “2020” for the year 2020)
Two-digit month (eg. “04” for the month of April)
Two-digit date (eg. “02” for the second day of the month)
The letter “T”
24-hour two-digit time (eg. “15” for 3:00 PM)
Two-digit minute (eg “05” for five minutes past the hour)
Two-digit second (eg. “05” for five seconds into the minute)
The letter “Z”
This results in a timestamp format of “YYYYMMDDTHHMMSS.SSSSSSZ” (eg. “20200402T150505Z” for April 4th, 2020 at 3:05:05 PM). Note: this is considered “R-friendly” as it does not use precise values for seconds
The standard format for loom timestamps; stores date/time information as the following:
Four-digit year (eg. “2020” for the year 2020)
Two-digit month (eg. “04” for the month of April)
Two-digit date (eg. “02” for the second day of the month)
The letter “T”
24-hour two-digit time (eg. “15” for 3:00 PM)
Two-digit minute (eg “05” for five minutes past the hour)
Seconds precise to the millionth (six digits after the decimal)
The letter “Z”
This results in a timestamp format of “YYYYMMDDTHHMMSS.SSSSSSZ” (eg. “20200402T150505Z” for April 4th, 2020 at 3:05:05 PM). Note: this is not considered “R-friendly” as it contains precise values for seconds. To properly format this time for pretty-printing, please remember to strip the precise seconds
# Get a timestamp format
SeuratDisk:::TSFormats()
# Create a timestamp
SeuratDisk:::Timestamp()
# Format a timestamp for easy viewing
time <- "20200804T214148Z"
SeuratDisk:::FormatTime(time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.