Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2022-rstudio-conf-its-about-time
Search
Davis Vaughan
July 05, 2022
0
490
2022-rstudio-conf-its-about-time
Davis Vaughan
July 05, 2022
Tweet
Share
More Decks by Davis Vaughan
See All by Davis Vaughan
New features in dplyr 1.1.0, plus an intro to ivs
davisvaughan
0
1.1k
slide-almanac.pdf
davisvaughan
0
540
useR-2019-rray.pdf
davisvaughan
0
1.2k
Rethinking Arrays in R
davisvaughan
3
1.8k
Arrays in R
davisvaughan
0
200
Modeling in the tidyverse
davisvaughan
0
270
Time series & financial analysis in the tidyverse
davisvaughan
4
920
Featured
See All Featured
Building Applications with DynamoDB
mza
93
6.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Building Adaptive Systems
keathley
40
2.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
650
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Automating Front-end Workflow
addyosmani
1368
200k
Scaling GitHub
holman
459
140k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Transcript
It’s about time Davis Vaughan July 2022
None
clock is not replacing lubridate
🔗 clock.r-lib.org Safety
🔗 clock.r-lib.org Calendars Safety
🔗 clock.r-lib.org 2022-01-30 Calendars Safety
None
🔗 clock.r-lib.org Jan 27 28 29 30 31 Feb Mar
1 2 Feb 27 28 1 2
🔗 clock.r-lib.org Jan 27 28 29 30 31 Feb Mar
1 2 Feb Add 1 month? ? 27 28 1 2
🔗 clock.r-lib.org "2022-01-30" + months(1) = NA Jan 27 28
29 30 31 Feb Mar 1 2 Feb Add 1 month? ? 27 28 1 2
🔗 clock.r-lib.org add_months("2022-01-30", 1) #> ! Invalid date found at
location 1. #> ℹ Resolve invalid date issues by #> specifying the `invalid` argument. Jan 27 28 29 30 31 Feb Mar 1 2 Feb Add 1 month? ? 27 28 1 2
🔗 clock.r-lib.org add_months("2022-01-30", 1, invalid = "previous") = "2022-02-28" Jan
27 28 29 30 31 Feb Mar 1 2 Feb Add 1 month? 27 28 1 2
🔗 clock.r-lib.org add_months("2022-01-30", 1, invalid = "next") = "2022-03-01" Jan
27 28 29 30 31 Feb Mar 1 2 Feb Add 1 month? 27 28 1 2
🔗 clock.r-lib.org add_months("2022-01-30", 1, invalid = "NA") = NA Jan
27 28 29 30 31 Feb Mar 1 2 Feb Add 1 month? 27 28 1 2
🔗 clock.r-lib.org "2022-01-30" year_month_day
🔗 clock.r-lib.org "2022-030" year_day "2022-01-30" year_month_day
🔗 clock.r-lib.org "2022-030" year_day "2022-01-Sun[5]" year_month_weekday "2022-Q1-30" year_quarter_day "2022-W04-7" iso_year_week_day
"2022-01-30" year_month_day
🔗 clock.r-lib.org "2022-030" year_day "2022-01-Sun[5]" year_month_weekday "2022-Q1-30" year_quarter_day "2022-W04-7" iso_year_week_day
"2022-01-30" year_month_day
🔗 clock.r-lib.org "2022-030" year_day "2022-01-Sun[5]" year_month_weekday "2022-Q1-30" year_quarter_day "2022-W04-7" iso_year_week_day
"2022-01-30" year_month_day Date POSIXct
🔗 clock.r-lib.org "2022-030" year_day "2022-01-Sun[5]" year_month_weekday "2022-Q1-30" year_quarter_day "2022-W04-7" iso_year_week_day
"2022-01-30" year_month_day Date POSIXct "2022-01" year_month_day<month> "2022-01-30" year_month_day
🔗 clock.r-lib.org Compatibility slider ivs Rolling average, looking back 3
quarters Intervals, i.e. [2022-01, 2022-07)
lubridate is NOT going anywhere But try clock for: -
Enhanced safety - Powerful types clock.r-lib.org