Nothing
#' @title Round a timestamp to the inferior integer
#'
#' @description
#' This function round a timestamp ()
#'
#' @param x The timestamp. See detail section for more information.
#'
#' @details
#' The accepted formats for the argument \code{x} are:
#'
#' \itemize{
#' \item \code{Date} objects;
#' \item numeric (\code{integer} or \code{double});
#' \item date/times object (classes \code{POSIXct} and \code{POSIXlt})
#' }
#'
#' @returns a \code{POSIXct} object with rounded \code{double} value.
#'
#' @keywords internal
#' @noRd
#'
#' @examples
#'
#' format_timestamp(1743694674.9)
#' format_timestamp(Sys.Date())
#'
format_timestamp <- function(x) {
output <- x |>
as.POSIXct(origin = "1970-01-01", tz = "UTC") |>
as.integer() |>
as.POSIXct(origin = "1970-01-01", tz = "UTC")
return(output)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.