Skip to content

Better-Python/Better-Holidays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better Markets

A better way to get market holidays

Installation

pip install better-holidays

Usage

import BetterHolidays as bh
import datetime as dt

NYSE = bh.get_market("NYSE")
# or
NYSE = bh.NYSE()
print(NYSE.is_holiday(dt.date(1979, 4, 13)))
print(NYSE.is_trading_day(dt.date(1979, 4, 13)))
print(NYSE.is_partial_day(dt.date(1979, 4, 13)))
print(NYSE.is_weekday(dt.date(1979, 4, 13)))
print(NYSE.is_weekend(dt.date(1979, 4, 13)))
print(NYSE.get_holidays(dt.date(1979, 4, 1), dt.date(1979, 4, 30)))

Contributing

Pull requests are welcome.

About

A better way to get market data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages