本文整理汇总了Python中dateutil.easter.EASTER_ORTHODOX属性的典型用法代码示例。如果您正苦于以下问题:Python easter.EASTER_ORTHODOX属性的具体用法?Python easter.EASTER_ORTHODOX怎么用?Python easter.EASTER_ORTHODOX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类dateutil.easter
的用法示例。
在下文中一共展示了easter.EASTER_ORTHODOX属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testEasterOrthodox
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def testEasterOrthodox(self):
for easter_date in orthodox_easter_dates:
self.assertEqual(easter_date,
easter(easter_date.year, EASTER_ORTHODOX))
示例2: _populate
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def _populate(self, year):
# New Year's Day
name = "New Year's Day"
self[date(year, 1, 1)] = name
# Orthodox Christmas day
name = "Orthodox Christmas Day"
self[date(year, 1, 7)] = name
# International Women's Day
name = "International Women's Day"
self[date(year, 3, 8)] = name
# Commemoration Day
name = "Commemoration Day"
self[easter(year, EASTER_ORTHODOX) + timedelta(days=9)] = name
# Spring and Labour Day
name = "Spring and Labour Day"
self[date(year, 5, 1)] = name
# Victory Day
name = "Victory Day"
self[date(year, 5, 9)] = name
# Independence Day
name = "Independence Day"
self[date(year, 7, 3)] = name
# October Revolution Day
name = "October Revolution Day"
self[date(year, 11, 7)] = name
# Dec. 25 Christmas Day
name = "Christmas Day"
self[date(year, 12, 25)] = name
示例3: orthodox_easter
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def orthodox_easter(start_date='1980', end_date='2021'):
"""
ASEX observes Orthodox Easter, and has many holidays
that are relative to Orthodox Easter. This function gives a
DatetimeIndex of Orthodox Easter dates from start_date to end_date
"""
return pd.to_datetime([
easter(year, method=EASTER_ORTHODOX)
for year in range(int(start_date), int(end_date))
]).tz_localize(UTC)
示例4: _populate
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def _populate(self, year):
eday = easter(year, method=EASTER_ORTHODOX)
# New Years
self[date(year, JAN, 1)] = "Πρωτοχρονιά [New Year's Day]"
# Epiphany
self[date(year, JAN, 6)] = "Θεοφάνεια [Epiphany]"
# Clean Monday
self[eday - rd(days=48)] = "Καθαρά Δευτέρα [Clean Monday]"
# Independence Day
self[date(year, MAR, 25)] = "Εικοστή Πέμπτη Μαρτίου [Independence Day]"
# Easter Monday
self[eday + rd(days=1)] = "Δευτέρα του Πάσχα [Easter Monday]"
# Labour Day
self[date(year, MAY, 1)] = "Εργατική Πρωτομαγιά [Labour day]"
# Monday of the Holy Spirit
self[eday + rd(days=50)] = \
"Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]"
# Assumption of Mary
self[date(year, AUG, 15)] = "Κοίμηση της Θεοτόκου [Assumption of Mary]"
# Ochi Day
self[date(year, OCT, 28)] = "Ημέρα του Όχι [Ochi Day]"
# Christmas
self[date(year, DEC, 25)] = "Χριστούγεννα [Christmas]"
# Day after Christmas
self[date(year, DEC, 26)] = \
"Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]"
示例5: _populate
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def _populate(self, year):
# The current set of holidays came into force in 1998
# http://laws.newsby.org/documents/ukazp/pos05/ukaz05806.htm
if year <= 1998:
return
# New Year's Day
self[date(year, JAN, 1)] = "Новый год"
# Jan 2nd is the national holiday (New Year) from 2020
# http://president.gov.by/uploads/documents/2019/464uk.pdf
if year >= 2020:
# New Year's Day
self[date(year, JAN, 2)] = "Новый год"
# Christmas Day (Orthodox)
self[date(year, JAN, 7)] = "Рождество Христово " \
"(православное Рождество)"
# Women's Day
self[date(year, MAR, 8)] = "День женщин"
# Radunitsa ("Day of Rejoicing")
self[easter(year, method=EASTER_ORTHODOX) + rd(days=9)] = "Радуница"
# Labour Day
self[date(year, MAY, 1)] = "Праздник труда"
# Victory Day
self[date(year, MAY, 9)] = "День Победы"
# Independence Day
self[date(year, JUL, 3)] = "День Независимости Республики Беларусь " \
"(День Республики)"
# October Revolution Day
self[date(year, NOV, 7)] = "День Октябрьской революции"
# Christmas Day (Catholic)
self[date(year, DEC, 25)] = "Рождество Христово " \
"(католическое Рождество)"
示例6: _populate
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def _populate(self, year):
# New Year's Day
name = "Нова година"
self[date(year, JAN, 1)] = name
self[date(year, JAN, 2)] = name
if self.observed and date(year, JAN, 1).weekday() in WEEKEND:
self[date(year, JAN, 3)] = name + " (Observed)"
# Orthodox Christmas
name = "Божић"
self[date(year, JAN, 7)] = name
# Statehood day
name = "Дан државности Србије"
self[date(year, FEB, 15)] = name
self[date(year, FEB, 16)] = name
if self.observed and date(year, FEB, 15).weekday() in WEEKEND:
self[date(year, FEB, 17)] = name + " (Observed)"
# International Workers' Day
name = "Празник рада"
self[date(year, MAY, 1)] = name
self[date(year, MAY, 2)] = name
if self.observed and date(year, MAY, 1).weekday() in WEEKEND:
self[date(year, MAY, 3)] = name + " (Observed)"
# Armistice day
name = "Дан примирја у Првом светском рату"
self[date(year, NOV, 11)] = name
if self.observed and date(year, NOV, 11).weekday() == SUN:
self[date(year, NOV, 12)] = name + " (Observed)"
# Easter
self[easter(year, method=EASTER_ORTHODOX) - rd(days=2)] = \
"Велики петак"
self[easter(year, method=EASTER_ORTHODOX) - rd(days=1)] = \
"Велика субота"
self[easter(year, method=EASTER_ORTHODOX)] = "Васкрс"
self[easter(year, method=EASTER_ORTHODOX) + rd(days=1)] = \
"Други дан Васкрса"
示例7: _populate
# 需要导入模块: from dateutil import easter [as 别名]
# 或者: from dateutil.easter import EASTER_ORTHODOX [as 别名]
def _populate(self, year):
if year < 1990:
return
# New Year's Day
self[date(year, JAN, 1)] = "Нова година"
# Liberation Day
self[date(year, MAR, 3)] = \
"Ден на Освобождението на България от османско иго"
# International Workers' Day
self[date(year, MAY, 1)] = \
"Ден на труда и на международната работническа солидарност"
# Saint George's Day
self[date(year, MAY, 6)] = \
"Гергьовден, Ден на храбростта и Българската армия"
# Bulgarian Education and Culture and Slavonic Literature Day
self[date(year, MAY, 24)] = \
"Ден на българската просвета и култура и на славянската писменост"
# Unification Day
self[date(year, SEP, 6)] = "Ден на Съединението"
# Independence Day
self[date(year, SEP, 22)] = "Ден на Независимостта на България"
# National Awakening Day
self[date(year, NOV, 1)] = "Ден на народните будители"
# Christmas
self[date(year, DEC, 24)] = "Бъдни вечер"
self[date(year, DEC, 25)] = "Рождество Христово"
self[date(year, DEC, 26)] = "Рождество Христово"
# Easter
self[easter(year, method=EASTER_ORTHODOX) - rd(days=2)] = \
"Велики петък"
self[easter(year, method=EASTER_ORTHODOX) - rd(days=1)] = \
"Велика събота"
self[easter(year, method=EASTER_ORTHODOX)] = "Великден"