Skip to contents

A named list holding every calendar in calendar_catalog(), pre-constructed — calendars$d365_h24 is identical to calendar("d365_h24"). Ported from the predecessor timeslices package's calendar library, with one deliberate difference: shares here are duration-proportional (January is 31/365 of the year, not 1/12), where timeslices shipped uniform shares.

Usage

calendars

Format

A named list of 43 Calendar objects. Names are the catalog ids (d365, d365_h24, m12, m12_h24, m12_md365, q4_h24, s4_hp3, ...); see calendar_catalog() for the full table with timeslice counts, coverage class, and regularity.

Source

Generated by data-raw/calendars.R from the package's own catalog (calendar(id) for each id).

Examples

names(calendars)
#>  [1] "d360"          "d364"          "d365"          "d366"         
#>  [5] "d360_h24"      "d364_h24"      "d365_h24"      "d366_h24"     
#>  [9] "m12"           "m12a"          "m12_h24"       "m12a_h24"     
#> [13] "m12_md360"     "m12_md360_h24" "m12_md365"     "m12_md365_h24"
#> [17] "m12_md366"     "m12_md366_h24" "q4"            "s4"           
#> [21] "q4_h24"        "s4_h24"        "w52"           "w53"          
#> [25] "w52_h24"       "w53_h24"       "w52_h168"      "w53_h168"     
#> [29] "wd7"           "wd7_h24"       "wk2"           "wk2_h24"      
#> [33] "fy04_m12"      "fy04_m12_h24"  "fy04_q4"       "fy04_q4_h24"  
#> [37] "fy04_d365"     "fy04_d365_h24" "hp3"           "d365_hp3"     
#> [41] "m12a_hp3"      "s4_hp3"        "q4_hp3"       
calendars$m12
#> Calendar: m12 
#> Timeframes (1):
#>   - MONTH (12) [token: m12]
#> Leaf timeslices: 12
#> year_fraction: 1
#> year_start: month=1, day=1
#> utc_offset_minutes: 0
identical(
  S7::prop(calendars$q4, "leaftable"),
  S7::prop(calendar("q4"), "leaftable")
)
#> [1] TRUE