## default time zone and format
jdatetime("1402-09-20 18:57:09")
jdatetime("1402/09/20 18:57:09", tzone = "UTC", format = "%Y/%m/%d %H:%M:%S")
## Will replace invalid format with NA
jdatetime("1402/09/20 18:57:09", format = "%Y-%m-%d %H:%M:%S")
## nonexistent time will be replaced with NA
jdatetime("1401-01-02 00:30:00", tzone = "Asia/Tehran")
## ambiguous time will be replaced with NA
jdatetime("1401-06-30 23:30:00", tzone = "Asia/Tehran", ambiguous = "NA")
## ambiguous time will resolve by choosing the later time instant
jdatetime("1401-06-30 23:30:00", tzone = "Asia/Tehran", ambiguous = "latest")
## Jalali date-time in Iran time zone, corresponding to Unix epoch
jdatetime(0, "Iran")
Run the code above in your browser using DataLab