HTTPDate-class: HTTP Date class

HTTPDate-classR Documentation

HTTP Date class

Description

Conversions between POSIXct to HTTP Date objects.

Arguments

from

numeric, POSIXct or HTTPDate object.

References

RFC7231 MDN

Examples

# convert POSIXct to HTTP date string
as(0, "HTTPDate") # Thu, 01 Jan 1970 00:00:00 GMT
as(Sys.time(), "HTTPDate")
# parse HTTP date string to POSIXct
dt = "Thu, 01 Jan 1970 00:00:00 GMT"
class(dt) = "HTTPDate"
as(dt, "POSIXct")

RestRserve documentation built on May 29, 2024, 8:18 a.m.