HTTPDate-class: HTTP Date class

Description Arguments References Examples

Description

Conversions between POSIXct to HTTP Date objects.

Arguments

from

numeric, POSIXct or HTTPDate object.

References

RFC7231 MDN

Examples

1
2
3
4
5
6
7
# 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 Jan. 13, 2021, 7:05 p.m.