bupaverse / bupaR

Core R package for business process analysis
http://www.bupar.net
Other
56 stars 6 forks source link

how to use custom date time for example persian calendar #21

Closed ehsankhoshkhoy closed 4 years ago

ehsankhoshkhoy commented 4 years ago

hi there, thank you for amazing package. timestamp column of my event log isn't Gregorian date time, namely is Persian calendar. how to convert Persian calendar in Gregorian calendar. for example 👍 30 august 2020 02:04:25 = 1399/06/09 02:04:25 Suppose I can not do this conversion in advance. EventLog function in your library doesn't support other calendar. Please check and update if needed. eventlog(

thanks best regards Ehsan

gertjanssenswillen commented 4 years ago

Dear Ehsan.

All that bupaR requires is that the timestamp variable is an object of POSIXct or Date type up front. We do not explicitly require it is Gregorian.

That is, bupaR does not convert characters to dates itself, but just expects them. An easy way to do this is to use lubridate, but this packages seems to not support Persian calendar (https://github.com/tidyverse/lubridate/issues/151).

The question is whether R has support for Persian dates. There seem to be some ways to convert Persian dates to Gregorian (https://stackoverflow.com/questions/62455880/how-convert-persian-date-to-gregorian-in-r), I'm not sure if it is this you want?

ehsankhoshkhoy commented 4 years ago

thanks