powered by
Get season from date time object
cut_seasons( datetime, definition = "meteorological", hemisphere = "northern", labels = NULL )
a Factor vector with 4 levels depending on the definitions (and labels if provided)
a POSIXct vector from with the season is constructed
the definition used to compute the season. See details section.
in the Southern hemisphere, seasons are reversed compared to the Northern one.
optional, a character vector of length fours with the seasons' names.
Available Definitions:
meteorological: Standard seasons (Dec-Feb = Winter, etc.)
astronomical: Based on equinoxes/solstices
djf: Dec-Jan-Feb, Mar-Apr-May, Jun-Jul-Aug, Sep-Oct-Nov
jfm: Jan-Feb-Mar, Apr-May-Jun, Jul-Aug-Sep, Oct-Nov-Dec
fma: Feb-Mar-Apr, May-Jun-Jul, Aug-Sep-Oct, Nov-Dec-Jan
amj, jas, ond: Alternative starting points for quarterly seasons
dates <- seq( from = as.POSIXct("2023-01-15"), to = as.POSIXct("2023-12-15"), by = "month" ) cut_seasons(dates)
Run the code above in your browser using DataLab