R lubridate - Date Arithmetic
Date arithmetic sounds simple until you actually try to implement it. Adding 30 days to January 15th is straightforward. Adding ‘one month’ is not—does that mean 28, 29, 30, or 31 days? What happens…
Read more →Date arithmetic sounds simple until you actually try to implement it. Adding 30 days to January 15th is straightforward. Adding ‘one month’ is not—does that mean 28, 29, 30, or 31 days? What happens…
Read more →Date manipulation in R has historically been painful. Base R’s strftime() and format() functions work, but their syntax is cryptic and error-prone. The lubridate package solves this problem with…
Time math looks simple until it isn’t. Adding ‘one day’ to a timestamp seems straightforward, but what happens when that day crosses a daylight saving boundary? Is a day 86,400 seconds, or is it 23…
Read more →Date parsing in R has historically been a pain point that trips up beginners and frustrates experienced programmers alike. The core problem is simple: dates come in dozens of formats, and computers…
Read more →