Skip to content

Instantly share code, notes, and snippets.

@ppeble
Last active October 22, 2017 02:58
Show Gist options
  • Save ppeble/88e3c084a2d55cf7ea3f3ee4a92921a8 to your computer and use it in GitHub Desktop.
Save ppeble/88e3c084a2d55cf7ea3f3ee4a92921a8 to your computer and use it in GitHub Desktop.
issue-24: change methods to non-ruby YAML

'Common' functions that must be implemented by the client:

  • easter(year)
  • to_monday_if_weekend(year)
  • to_monday_if_sunday(date)
  • to_tuesday_if_sunday_or_monday_if_saturday(date)
  • to_weekday_if_boxing_weekend_from_year_or_to_tuesday_if_monday(year)
  • orthodox_easter(year)
  • orthodox_easter_julian(year)
  • to_weekday_if_weekend(date)
  • to_weekday_if_boxing_weekend(date)

Regions and tests

  • ar - DONE
    • easter - DONE
  • at - DONE
    • Ostermontag easter+1 - DONE
    • Christi Himmelfahrt easter+39 - DONE
    • Pfingstmontag easter +50 - DONE
    • Fronleichnam easter +60 - DONE
  • au - DONE
    • Good Friday easter-2 - DONE
    • Easter Saturday easter-1 - DONE
    • Easter Sunday easter - DONE
    • Easter Monday easter+1 - DONE
    • New Year's Day (au, au_tas) to_monday_if_weekend(year) - DONE
    • March Public Holiday (au_sa) march_pub_hol_sa(year) - DONE
    • May Public Holiday (au_sa) may_pub_hol_sa(year) - DONE
    • ANZAC Day (au_nsw) to_monday_if_sunday(date) - DONE
    • Labour Day (au_qld) qld_labour_day_may(year) - DONE
    • Queen's Birthday (au_qld) qld_queens_birthday_june(year) - DONE
    • Friday before the AFL Grand Final (au_vic) afl_grand_final(year) - DONE
    • Labour Day (au_qld) qld_labour_day_october(year) - DONE
    • Queen's Birthday (au_qld) qld_queens_bday_october(year) - DONE
    • Royal Hobart Show (au_tas_south) hobart_show_day(year) - DONE
    • G20 Day (au_qld_brisbane) g20_day_2014_only(year) - DONE
    • Christmas Day (au_qld) to_tuesday_if_sunday_or_monday_if_saturday(date) - DONE
    • Boxing Day (au_tas) to_weekday_if_boxing_weekend_from_year(year) - DONE
    • Proclamation Day (au_sa) to_weekday_if_boxing_weekend_from_year_or_to_tuesday_if_monday(year) - DONE
  • be_fr - DONE
    • easter - DONE    * Lundi de Pâques - easter +1 - DONE
    • Ascension - easter+39 - DONE
    • Pentecôte - easter+49 - DONE
    • Lundi de Pentecôte - easter+ 50 - DONE
  • be_nl - DONE
    • easter - DONE    * Lundi de Pâques - easter +1 - DONE    * Ascension - easter+39 - DONE   * Pentecôte - easter+49 - DONE
    • Lundi de Pentecôte - easter+ 50 - DONE
  • bg_en - DONE
    • bg_en - Good Friday - easter_orthodox_julian - 2 - DONE
    • bg_bg - Разпети петък - orthodox_easter_julian - 2 - DONE
    • be_en - Holy Saturday - orthodox_easter_julian - 1 - DONE
    • bg_bg - Велика събота - orthodox_easter_julian - 1 - DONE
    • bg_en - Easter Sunday - orthodox_easter_julian - DONE
    • bg_bg - Възкресение Христово. Великден - orthodox_easter_julian - DONE
    • bg_en - Easter monday - orthodox_easter_julian + 1 - DONE
    • bg_bg - Възкресение Христово. Великден - orthodox_easter_julian + 1 - DONE
  • br - easter only - DONE

At this point I am only going to do holidays that I haven't done yet. No more easter, they are covered by the other regions.

  • ca - DONE
    • ca_ab, ca_bc, ca_mb, ca_nt, ca_nu, ca_on, ca_sk, ca_yt - Victoria Day - ca_victoria_day(year) - DONE
    • ca_qc - National Patriotes Day - ca_victoria_day(year) - DONE
  • ch - DONE
    • ch_vd - Lundi du Jeûne fédéral - ch_vd_lundi_du_jeune_federal(year) - DONE
    • ch_ge - Jeûne genevois - ch_ge_jeune_genevois(year) - DONE
    • ch_gl - Näfelser Fahrt - ch_gl_naefelser_fahrt(year) - DONE
  • cl - DONE
    • cl - San Pedro y San Pablo - st_peter_st_paul_cl(year) - DONE
    • cl - Día de las Iglesias Evangélicas y Protestantes - other_churches_day_cl(year) - DONE
    • cl - Encuentro de Dos Mundos - columbus_day_cl(year) - DONE
  • cr - DONE
  • cz - DONE
  • de - DONE
    • de_sn - Buß- und Bettag - de_buss_und_bettag(year) - DONE
  • dk - DONE
  • ecb_target - DONE
  • ee - DONE
  • el - DONE
    • el - Μεγάλη Παρασκευή - orthodox_easter(year) - DONE

*** Don't need orthodox_easter after this point

  • es - DONE
  • federal_reserve - DONE
  • fedex - DONE
  • fi - DONE
    • fi - Pyhäinpäivä - fi_pyhainpaiva(year) - DONE
    • fi - Juhannusaatto - fi_juhannusaatto(year) - DONE
    • fi - Juhannuspäivä - fi_juhannuspaiva(year) - DONE
  • fr - DONE
  • gb - DONE
  • ge - DONE
  • hk - DONE
      • hk - cn_new_lunar_day(year) - DONE
  • hr - DONE
  • hu - DONE
  • ie - DONE
  • is - DONE
    • is - Sumardagurinn fyrsti - is_sumardagurinn_fyrsti(year) - DONE
  • it - DONE
  • jp - DONE (this one might be more complex...)
    • jp - 振替休日 - p_substitute_holiday(year, month, day) - DONE
    • jp - 春分の日 - jp_vernal_equinox_day(year) - DONE
    • jp - 振替休日 - jp_vernal_equinox_day_substitute(year) - DONE
    • jp - 振替休日 - jp_marine_day_substitute(year) - DONE
    • There are a lot of 'substitute' days...the same?
  • kr - DONE
    • kr - 설날 - lunar_to_solar(year, month, day, region) - DONE
  • li - DONE
  • lt - DONE
  • lu - DONE
  • ma - DONE
  • mt_en - DONE
  • mt_mt - DONE
  • mx - DONE
  • my - DONE
  • nerc - DONE
  • nl - DONE
  • tn - DONE
  • tr - DONE
    • tr - Ramazan Bayramı - ramadan_feast(year) - DONE
    • tr - Kurban Bayramı - sacrifice_feast(year) - DONE
  • united_nations (no tests in this one 😬) - DONE
  • ups - DONE
    • ups - Day After Thanksgiving - day_after_thanksgiving(year) - DONE
  • us - DONE
    • us_tx - Inauguration Day - us_inauguration_day(year) - DONE
    • us_va - Lee-Jackson Day - lee_jackson_day(year, month) - DONE
    • us_ga - State Holiday - georgia_state_holiday(year, month) - DONE
    • us_de - Election Day - election_day(year) - DONE
    • us_nv - Day After Thanksgiving - day_after_thanksgiving(year) - DONE
  • ve - DONE
  • vi - DONE
  • za - DONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment