Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Stop hard-coding holidays: 4 free calendar datasets for developers

Date bugs rarely show up on the day you write the code. They show up on a holiday, on a clock-change weekend, or when someone needs a calendar your library does not have. We publish four calendar datasets as plain CSV and JSON, generated from the same code as the date tools on ToolWix (disclosure: that is our site). They are CC BY 4.0, so commercial use is fine with credit. Dataset Covers Links…

Developers should avoid hard-coding holidays in their code, as bugs often arise during holidays, clock changes, or when the library lacks support for a specific calendar. To address this issue, ToolWix has published four calendar datasets as plain CSV and JSON files, generated from the same code used for their date tools. These datasets are licensed under CC BY 4.0, allowing commercial use with proper attribution.

The first dataset contains business days and payroll dates from 2026 to 2030 for US, UK (three regions), Canada, and Australia. It can be used to add business days while skipping holidays by leveraging the pandas library in Python. The code example demonstrates how to add three business days to a given date, skipping US national holidays. However, it is recommended to raise an error for dates outside the specified range instead of treating them as regular days.

The second dataset focuses on paydays that move according to a common convention of paying on the previous business day. It includes data for the US region with weekly schedules and scheduled pay dates.

The third dataset details DST (Daylight Saving Time) clock changes for New York and London in 2027. It shows when the US moves forward on 14 March and the UK on 28 March, as well as when they move back on 31 October (UK) and 7 November (US), causing a 9:00 New York meeting to occur at different London times during the transition period.

The fourth dataset offers a solution for converting dates to the Nepali calendar in JavaScript, known as Bikram Sambat. Since Nepali month lengths are not based on a consistent formula, a lookup table is the practical approach. The provided code fetches the dataset from GitHub and creates a mapping of Gregorian dates to their corresponding Bikram Sambat dates. It is suggested to bundle a copy of the file for production use rather than fetching it from GitHub at runtime.

Lastly, the fifth dataset provides world calendars from 2026 to 2030, featuring seven calendars side by side. This dataset can be accessed using the Hugging Face dataset library in Python.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Internals of a JSON Parser

JSON is something with which software development engineers work almost every day. Elaborated as, JavaScript Object Notation, JSON is a lightweight text-based format for representing structured data…

  • Tokenization breaks JSON string into tokens
  • Syntactic analysis forms Abstract Syntax Tree
  • Tokenization not unique to NLP

Counting a daily free quota in Redis without forcing sign-in first

Letting people use a web app before creating an account removes a lot of friction. It also turns a simple rate limit into a small state-management problem: how do you enforce a daily free quota when…

  • Sorirok app sets daily limit of three one-hour files for all users.
  • Developers use single Redis key system to track daily limit fairly.
  • Anonymous cookie and IP counter manage unsigned visitors' quota.

Redfin tax data in TypeScript: keep history separate from forecasts

Your rental shortlist can look profitable because its tax number answers the wrong question. You're comparing potential purchases, and the annual cash flow calculation needs an expense.

  • Separate tax history from forecasts to avoid misleading assumptions
  • Fetch detailed data before scoring properties for acquisition
  • Enrichment uses cookieless detail endpoint for reliable data

Cholesteric Liquid Crystal Elastomer Skin: 18μm Adaptive Optics at 60Hz

TL;DR Cholesteric Liquid Crystal Elastomers (CLCEs) combined with metasurface electrodes form an 18μm-thick adaptive optical film that physically modulates reflected wavelength via helical pitch…

  • Cholesteric Liquid Crystal Elastomers (CLCEs) create 18μm adaptive optical film
  • Edge AI runs 60Hz control loop to maintain symmetry and diffusion scores
  • Bypassing digital controller restores passive structural-color behavior

More from Tuesday, 1 December 2026 →