jdate_make {shide} | R Documentation |
Construct Jalali date-time objects from individual components
Description
-
jdate_make()
creates ajdate
object from individual components. -
jdatetime_make()
creates ajdatetime
object from individual components.
Usage
jdate_make(year, month = 1L, day = 1L, ...)
jdatetime_make(
year,
month = 1L,
day = 1L,
hour = 0L,
minute = 0L,
second = 0L,
tzone = "",
...,
ambiguous = NULL
)
Arguments
year |
Numeric year. |
month |
Numeric month. |
day |
Numeric day. |
... |
These dots are for future extensions and must be empty. |
hour |
Numeric hour. |
minute |
Numeric minute. |
second |
Numeric second. |
tzone |
A time zone name. Default value represents local time zone. |
ambiguous |
Resolve ambiguous times that occur during a repeated interval (when the clock is adjusted backwards during the transition from DST to standard time). Possible values are:
If |
Details
Numeric components are recycled to their common size using tidyverse recycling rules.
Value
-
jdate_make()
A vector of jdate object. -
jdatetime_make()
A vector of jdatetime object.
Examples
## At least 'year' must be supplied
jdate_make(year = 1401)
## Components are recycled
jdatetime_make(year = 1399:1400, month = 12, day = c(30, 29), hour = 12, tzone = "UTC")
## resolve ambiguous time by choosing the later time instant
jdatetime_make(1401, 6, 30, 23, 0, 0, tzone = "Asia/Tehran", ambiguous = "latest")