| Action |
Code |
Details |
|
From ymd
|
ISOdate(year, month, day) |> as.Date()
|
|
|
From ymd
|
lubridate::make_date(year, month, day)
|
|
|
Current date
|
|
|
|
Current date
|
lubridate::today() |> as.Date()
|
|
|
Current date in UTC timezone
|
lubridate::today(tzone = 'UTC') |> as.Date()
|
|
|
Unix epoch
|
|
|
|
From total days since Unix epoch
|
|
|
|
From total days since reference date
|
as.Date(n, origin = ref_date)
|
|
|
Date from YYYY-MM-DD string
|
|
|
|
Date from Y-m-d ordered string
|
|
|
|
Date from DD-MMM-YYYY string
|
|
|
|
Date from d-m-Y ordered string
|
|
|
| Action |
Code |
Details |
|
Vector of length n filled with date d
|
|
|
|
Sequence (vector) of n consecutive dates, starting from d
|
seq(d, length.out = n, by = 'day')
|
|
|
Sequence of n consecutive dates, starting from d
|
seq(d, length.out = n, by = 'day')
|
|
|
Sequence (vector) of consecutive dates between dates d and d2
|
|
|
|
Sequence of n dates, starting from d with weekly increments
|
seq(d, length.out = n, by = 'week')
|
|
|
Sequence of n dates counting down from date d with weekly decrements
|
seq(d, length.out = n, by = '-1 week')
|
|
|
Sequence of n dates, starting from d with w-week increments
|
seq(d, length.out = n, by = 'w week')
|
|
|
Sequence of dates between d and d2 with weekly increment
|
|
|
|
Sequence of n dates, starting from d with yearly increments
|
seq(d, length.out = n, by = 'year')
|
|