The current day and time
now(tzone = "")
today(tzone = "")
now
- the current datetime as a POSIXct
object
now()
#> [1] "2025-05-13 19:35:41 UTC"
now("GMT")
#> [1] "2025-05-13 19:35:41 GMT"
now("")
#> [1] "2025-05-13 19:35:41 UTC"
now() == now() # would be TRUE if computer processed both at the same instant
#> [1] FALSE
now() < now() # TRUE
#> [1] TRUE
now() > now() # FALSE
#> [1] FALSE
today()
#> [1] "2025-05-13"
today("GMT")
#> [1] "2025-05-13"
today() == today("GMT") # not always true
#> [1] TRUE
today() < as.Date("2999-01-01") # TRUE (so far)
#> [1] TRUE