chrisvwn / Rnightlights

R package to extract data from satellite nightlights.
GNU General Public License v3.0
47 stars 14 forks source link

Replacing `lubridate::date(lubridate::now())` calls with `Sys.Date()`. #58

Closed memoryfull closed 4 years ago

memoryfull commented 4 years ago

Hello.

I have noticed a code-breaking functionality in nlperiod.R::getAllNlPeriods().

Now seq(as.Date(startDate), as.Date(date(), "%c"), by = "month") returns NA on some locales (also notice missing lubridate::). In this PR I have simplified it to seq(as.Date(startDate), as.Date(Sys.Date(), "%c"), by = "month") to make sure it is not locale-dependent.

I have also replaced all lubridate::date(lubridate::now()) with Sys.Date().

chrisvwn commented 4 years ago

Thanks again @memoryfull! Reviewing for merge!

chrisvwn commented 4 years ago

Thanks @memoryfull!

chrisvwn commented 4 years ago

@memoryfull I am grateful for your help. Do let me know if you find any other bugs or areas for improvement.