as_jdatetime | R Documentation |
jdatetime
objectA generic function that converts other date/time classes to jdatetime
.
as_jdatetime(x, tzone, ...)
x |
a vector of |
tzone |
A time zone name. |
... |
These dots are for future extensions and must be empty. |
If tzone
is missing (default), time zone attribute of input object is used for conversion.
If the input object does not have time zone attribute (e.g. jdate
), and no value is supplied
for tzone
, local time zone is assumed for conversion.
A vector of jdatetime
objects with the same length as x.
## The time will be set to midnight when converting from `jdate` or `Date`
as_jdatetime(jdate_now())
as_jdatetime(Sys.Date())
## We can change time zone of a `jdatetime` to a new time zone
as_jdatetime(jdatetime_now(tzone = "Iran"), tzone = "Asia/Tokyo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.