Business days/working days counter (automatic exclusion of Japanese holidays) | ZeroTools

Dynamically counts the actual number of business days excluding Saturdays, Sundays, holidays (Japanese national holidays and substitute holidays) and arbitrary holidays from the start date and end date. It is a convenient web tool that operates completely locally and safely without sending data to an external server.

Loading tool interface...

Client-Side Secure Execution

This tool executes entirely in your browser sandbox. None of your input strings, files, or configurations are uploaded to any external server.

ZeroTools: Browser Processing & Privacy

ZeroTools focuses on tools that process input on your device. Check each tool’s scope and limitations before use.

Processing and privacy policy
Chapter 1

Structure of dynamic judgment engine compliant with Law No. 178 of 1948

The core of this system is a strict date determination mechanism based on the National Holiday Law, Law No. 178 of 1944. Holidays in the Japanese calendar include not only fixed dates, but also moving holidays that require astronomical calculations, such as the vernal equinox and autumnal equinox.

Furthermore, it is necessary to completely cover the complex calendar rules unique to Japan, such as substitute holidays that occur when a holiday falls on a Sunday, and national holidays that occur on a weekday sandwiched between two holidays.

The engine takes the specified year and month information as input and uses the built-in calendar calculation algorithm to dynamically calculate all legal holidays within that period.

Specifically, it implements the logic of calculating the ecliptic longitude based on data from the calendar chronology published by the National Astronomical Observatory of Japan to accurately predict annual fluctuations.

This makes it possible to generate accurate holiday information in the future without updating the system. In addition, information on the establishment and name changes of holidays due to past legal amendments, as well as additional information on temporary holidays due to the Temporary Special Measures Act, is also compiled into a database, making it possible to accurately calculate the number of business days going back in time.

This dynamic decision engine plays an extremely important role in providing basic data for the subsequent calculation of business days, and has a robust architecture that handles any exceptions without exception.

Chapter 2

Implementation form of business days counting algorithm excluding non-working days

A standard non-working day list is generated by combining the legal holiday data obtained from the dynamic judgment engine in the previous chapter with the basic holidays on the calendar, such as Saturdays and Sundays.

However, in actual corporate activities, there are special holidays unique to each organization, such as year-end and New Year holidays, special summer holidays, and founding anniversaries.

The non-working days excluded business days counting algorithm has advanced processing capabilities that integrate all these holiday parameters and extract and count only the pure working days that exist within the period from the specified start date to the end date.

In the process, the total number of days in the target period is developed as a one-dimensional array, and a comparison process is performed in a scanning manner against a previously generated integrated list of non-working days.

This verification uses high-speed truth/false judgment using bit operations, achieving an immediate response in milliseconds even when calculations are performed over a long period of several years.

It is also possible to introduce the concept of business hours determined by each company and apply a weighted counting method using decimals to irregular working days such as half-holidays and shortened business days.

This flexible counting algorithm ensures accurate calculation of working days that meets the working regulations of any company, regardless of industry or organizational structure.

Chapter 3

Backward delivery date calculation logic based on the principle of inclusion and exclusion on the first day

The principle that the first day is not counted as stipulated in Article 140 of the Civil Code is the basis for calculating periods in business, but depending on the contract type and business practices, the first day is often included in the calculation.

This system is equipped with a precise flag control mechanism that allows you to individually set whether or not to include the start date and end date in calculations.

This control allows flexible calculations ranging from general delivery calculations such as five business days from the day after the order date to special calculations starting from the day the contract is concluded.

What is also noteworthy is the existence of backward calculation delivery date calculation logic that calculates the start date and end date by calculating backwards from the specified number of business days.

If the target delivery deadline has been determined in advance, the final deadline for starting work can be accurately identified by subtracting the required number of work days from there.

In this backward counting process, unlike normal forward counting, an iterative determination loop is executed that skips non-working days while going back in time.

Simple subtraction of the number of days would result in a fatal error when there are consecutive long holidays or year-end and New Year holidays, but this logic performs retroactive calculations while checking against the integrated list of non-working days in real time, so there is no error even on a daily basis.

Chapter 4

. Optimizing custom holiday settings using browser local memory

We have adopted a design in which organization-specific holiday settings and project-specific non-working day definitions are stored directly in the browser's local memory area on the client side, rather than on the server side.

This local processing architecture, which eliminates asynchronous communication, provides immediate feedback with no delay to user input.

The set custom holiday array data is serialized and persisted in local storage, and is instantly restored at the start of the next session.

The data structures saved are either highly optimized binary formats or lightweight Jason formats that minimize browser memory consumption.

Custom holiday parameters can be specified not only by a single date, but also by repetitive rule-based specifications such as the Friday of each month, and these rules are expanded in local memory and dynamically applied to the calendar array.

This system, which does not rely on an external database, also has the major security advantage of being able to safely process highly confidential internal schedule information without having to send it outside the network.

Users can reflect their company's work rules in detail in the system in an environment where their privacy is completely protected.

Chapter 5

Real-time evaluation mechanism for project man-hours and operating days

Whenever the period settings or custom holiday parameters that form the basis of calculations are changed, the built-in reactive engine immediately launches and re-evaluates the entire project's man-hours and working days in real time.

The moment the start date picker or end date picker on the user interface is operated, the calculation thread running as a background process calls the aforementioned counting algorithm and redraws the resulting numbers.

This series of evaluation mechanisms works closely with Virtual Dom's differential update technology, and smoothly updates only the necessary numerical values ​​without having to reload the entire screen.

Project managers can visually and intuitively understand how the overall number of workable days will change while fine-tuning parameters on the screen.

It also has a function that instantly converts the calculated number of business days into more advanced project indicators such as total man-months and total man-hours by multiplying the estimated amount of work per day and human resource coefficients.

This dynamic, continuous evaluation cycle dramatically improves the accuracy and speed of estimating during the early stages of a project.

Chapter 6

Utilization guidelines for calculating contract delivery dates and formulating business schedules

The highly accurate business day calculation function provided by this system plays a central role in a wide variety of business situations.

Especially when creating legal contracts that require strict date management or calculating failure response time in service level agreements, this is decisive evidence to prevent misunderstandings due to different definitions of holidays.

When formulating work schedules, we visualize the truly usable number of work days in critical path analysis of long-term projects that span long holidays and support the establishment of realistic and executable milestones.

Furthermore, by using the specified holiday customization function, it is possible to completely adapt to situations where strict industry-specific days calculation rules are required, such as determining bill settlement dates at financial institutions or calculating standard processing periods for applications for approval and approval from administrative agencies.

Users are not only freed from the simple task of counting days, but also the risk of contract violations and project delays caused by incorrect deadline calculations can be eliminated.

The business days/days counter serves as an extremely reliable infrastructure to meet today's complex business requirements.