Skip to content

Commit

Permalink
BrazilExchange calendar adjustments for 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
felipenoris committed Dec 29, 2020
1 parent a3abff9 commit 4a787c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "4f18b42c-503e-5345-9536-bb0f25fc7038"
license = "MIT"
authors = ["Felipe Noronha <[email protected]>"]
repo = "https://github.com/JuliaFinance/BusinessDays.jl.git"
version = "0.9.11"
version = "0.9.12"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 1 addition & 1 deletion src/calendars/brazil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function isholiday(::BrazilExchange, dt::Dates.Date)

if (
# Aniversário de São Paulo
( mm == 1 && dd == 25 )
( mm == 1 && dd == 25 && yy != 2022 )
||
# Revolucão
( mm == 7 && dd == 9 && yy != 2020 )
Expand Down
7 changes: 7 additions & 0 deletions test/calendar_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ test_bdays(:WeekendsOnly, (2019, 8, 23), (2019, 8, 24), 1)
@test isbday(hc_brazil_exc, Dates.Date(2020, 07, 09)) == true # 2020 update by Ofício Circular 072/2020-PRE
@test isbday(hc_brazil_exc, Dates.Date(2020, 11, 20)) == true # 2020 update by Ofício Circular 072/2020-PRE

# BrazilExchange 2021 calendar
@test isholiday(hc_brazil_exc, Dates.Date(2021, 1, 25)) == true
@test isholiday(hc_brazil_exc, Dates.Date(2021, 7, 9)) == true

# BrazilExchange 2022 calendar
@test isholiday(hc_brazil_exc, Dates.Date(2022, 1, 25)) == false # updated by Ofício Circular 150/2020-PRE

# USSettlement HolidayCaledar tests
# Federal Holidays listed on https://www.opm.gov/policy-data-oversight/snow-dismissal-procedures/federal-holidays/#url=2015
@test isbday(hc_usa, Dates.Date(2014, 12, 31)) == true
Expand Down

2 comments on commit 4a787c3

@felipenoris
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/27032

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.12 -m "<description of version>" 4a787c3ae1f81b8020275c17ec25b6d0642dc0a1
git push origin v0.9.12

Please sign in to comment.