LSEG Data Library for Python

is_working_day

The is_working_day function checks if a specified date is a working day for any calendars or currencies provided.

Module

refinitiv.data

Syntax

is_working_day(date, currencies, calendars)

Parameters

Value Description Data type Optional Default value
date Specified date to check. str, date, datetime, timedelta Yes None
currencies Currencies used to verify whether the date is a working day or weekend. List[str] Yes None
calendars Calendars used to verify whether the date is a working day or weekend. List[str] Yes None

Returned value

True or False

Usage

The following example demonstrates how to check if the particular working day is in the Eurozone or not:

import datetime

import lseg.data as ld


# open session
ld.open_session()

is_working = ld.dates_and_calendars.is_working_day(
    date=datetime.datetime(2020, 7, 10),
    currencies=["EUR"]
)

print(is_working)

# close session
ld.close_session()

This example produces the following output:

True

None

99 words (0:31 mins)