All guidesHolidays

How to check business days from a CSV

Prepare a CSV date column, select country context, and export business-day review fields.

Why this matters

This guide gives a workflow for marking CSV dates as weekend, public holiday, or business day.

Required columns

At minimum, a CSV needs a date column and a country code. If the entire file uses one country, a default country setting can be applied. Dates should be normalized to YYYY-MM-DD before checking, with invalid dates left for review.

Output fields

A useful export includes weekday, is_weekend, is_public_holiday, matched_holiday_names, is_business_day, source, and generated_at. Keep original_date so invalid rows can be traced.

Review edge cases

Regional holidays, observed dates, missing country coverage, and invalid date strings should be routed to review instead of being marked as business days.

Prepare dates before checking

A business-day CSV workflow is only as reliable as its date and country columns. Normalize dates to YYYY-MM-DD where possible, keep timezone assumptions out of the date field, and avoid spreadsheet formats that depend on locale. A value such as 05/06/2026 can mean May 6 or June 5 depending on the country. UDataX expects explicit dates so the weekend and holiday checks can be reproduced after export.

Country context

Every row needs country context. If the file has one country, use a default country and document that assumption in the export. If rows span multiple countries, keep a country column and standardize it before checking holidays. Do not use currency or phone prefix as the only country signal unless the row is routed to review. Public holiday rules are country-specific, and regional holidays can make a simple national check incomplete.

Suggested output columns

Export original_date, normalized_date, country_code, weekday, is_weekend, is_public_holiday, matched_holiday_names, is_business_day, next_business_day, source, and generated_at. If parsing fails, keep parse_status and parse_note. This format lets analysts filter rows by reason rather than only seeing a final business-day flag. It also makes it clear whether the result came from weekend logic, holiday matching, or a parsing problem.

Edge cases

Route invalid dates, missing countries, unsupported years, regional holidays, observed dates, and source gaps to review. A date may be a business day for one country and a public holiday for another. A Monday may be a substitute holiday even when the named holiday falls on a weekend. UDataX provides reference checks for data preparation; payroll, settlement, court, and compliance deadlines should be validated with the relevant official calendar.

Source basis

UDataX holiday workflows use generated Nager.Date public holiday snapshots for selected countries and years. The data is suitable for planning, reporting, and business-day review, but holiday rules are local and sometimes depend on region, observed dates, bank calendars, or government decisions. UDataX keeps source, year, country, type, and scope fields visible so users can understand what was matched rather than relying on an unexplained yes or no.

How this connects to the tools

Use Time and Holidays to inspect one country-year table, check one date, or export a reference list for a spreadsheet. For CSV workflows, prepare country and date columns first, normalize dates to YYYY-MM-DD, and keep unmatched or unsupported rows in review. The business-day result should include the weekday, weekend flag, public holiday flag, matched holiday names, source, and generated date so the decision can be audited later. This makes spreadsheet filters and downstream QA rules easier to explain.

Acceptance criteria for production use

A holiday or business-day result is ready for scheduling support, reporting, and data QA when the country, date, source year, matched holiday names, and public-holiday status are present. It is not ready for payroll, settlement, statutory deadlines, court filings, or financial-market operations without checking the relevant official calendar. Observed dates, substitute holidays, and regional closures should always be reviewed when the outcome has operational or legal impact. Keep the generated_at value and selected year in exports so old holiday snapshots can be identified later.

Examples

  • 1Input
    country,date
  • 2Output
    is_business_day, matched_holidays