Work day searching method and device, storage medium and equipment

A technology of working days and binary search method, applied in the field of data processing, can solve the problems of large database load and low calculation efficiency, and achieve the effect of fewer holidays, reduced traversal time, and fast calculation.

Inactive Publication Date: 2019-09-20
重庆颂拓科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention proposes a working day search method, device, storage medium and equipment to solve the problems of large database load and low calculation efficiency in the working day search method in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Work day searching method and device, storage medium and equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0026] The weekday search method in this embodiment is as follows: figure 1 shown, including:

[0027] Step S1, read the user configuration file and extract holidays from it, store the holidays sequentially to form a holiday sequence. Among them, the calendar data in the database is not divided into workdays and holidays. After the user configures, one piece of data per day is used to distinguish between workdays and holidays through a flag field, such as: 1 indic...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the technical field of data processing, and discloses a workday searching method and device, a storage medium and equipment, and the method comprises the steps: S1, reading a user configuration file, extracting holidays and festivals from the user configuration file, and sequentially storing the holidays and the festivals to form a holidays and festival sequence; S2, respectively positioning the positions of the start date and the end date in the holiday sequence, and counting the number of the holidays and the holidays between the start date and the end date; and S3, subtracting the number of holidays and festivals from the total number of days between the start date and the end date to obtain the number of working days between the start date and the end date. According to the method, a database does not need to be accessed, traversing of each workday is not needed, the number of holidays and festivals is relatively small, traversing time is greatly shortened, and therefore the number of the workdays can be rapidly calculated.

Description

technical field [0001] The present invention relates to the technical field of data processing, and in particular to a method, device, storage medium and equipment for finding workdays. Background technique [0002] The traditional working day calculation method is: directly based on java.util.Calendar to judge the working days within the start and end time range, that is, after giving the start date and end date, search in sequence to calculate the number of working days. The advantage of this algorithm is that it is simple in logic and can be calculated without additional data configuration. But the actual situation is that you may have to work on weekends, and non-weekends may be holidays. Therefore, this calculation method is only applicable to the situation without additional holidays. [0003] Based on the above reasons, a general enterprise will design a calendar table at the beginning to record working days and holidays, and provide a functional interface for users ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/903G06Q10/10
CPCG06F16/90348G06Q10/109
Inventor 王海瑜
Owner 重庆颂拓科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products