CN110018760A - A kind of selection of time method, storage medium, equipment and system - Google Patents

A kind of selection of time method, storage medium, equipment and system Download PDF

Info

Publication number
CN110018760A
CN110018760A CN201810023300.XA CN201810023300A CN110018760A CN 110018760 A CN110018760 A CN 110018760A CN 201810023300 A CN201810023300 A CN 201810023300A CN 110018760 A CN110018760 A CN 110018760A
Authority
CN
China
Prior art keywords
time
selection
fiducial
period
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810023300.XA
Other languages
Chinese (zh)
Other versions
CN110018760B (en
Inventor
黄诚
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810023300.XA priority Critical patent/CN110018760B/en
Publication of CN110018760A publication Critical patent/CN110018760A/en
Application granted granted Critical
Publication of CN110018760B publication Critical patent/CN110018760B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of selection of time method, storage medium, equipment and systems, are related to selection of time technical field, this method comprises: presetting fiducial time, fiducial time is user's local time;Multiple periods are set using fiducial time and by terminal of current time, and to one selection of time control of corresponding generation of each period;The corresponding period is returned according to the selection of time control of user's selection.The present invention can select reasonable time section, carry out accurately selection of time, easy to operate, do not need user and carry out cumbersome operation.

Description

A kind of selection of time method, storage medium, equipment and system
Technical field
The present invention relates to selection of time technical fields, and in particular to a kind of selection of time method, storage medium, equipment and is System.
Background technique
At this stage, user is led to when checking that data sheet, historical record etc. need to carry out certain time interval selection operation Often it may be only accurate to number of days, such as: section as 2017-10-01--2017-10-10, traditional mode of operation are primarily present The problem of granularity of operation is excessively thick, can not see precision data.
And the existing mode for solving this method is mostly: providing corresponding input frame by the starting of user data time interval Timestamp and deadline stamp, are then calculated accordingly again;
But though existing settling mode solves the problems, such as not providing more accurately operation granularity, and user's operation is excessively Complexity, user is every time using need to be converted into timestamp for the relevant time.
Summary of the invention
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of selection of time method, storages to be situated between Matter, equipment and system can select reasonable time section, carry out accurately selection of time, easy to operate.
To achieve the above objectives, the technical solution adopted by the present invention is that:
A kind of selection of time method is used for client and carries out selection of time, method includes the following steps:
Fiducial time is preset, the fiducial time is user's local time;
Multiple periods are set using fiducial time and by terminal of current time, and to the corresponding life of each period At a selection of time control;
The corresponding period is returned according to the selection of time control of user's selection.
Based on the above technical solution, the selection of time method is further comprising the steps of:
It develops end and receives the period returned, and generate the time parameter for being used for selection of time;
The exploitation end carries out selection of time work according to the time parameter.
Based on the above technical solution, the selection of time method is further comprising the steps of;
A call back function is created, be used to obtain the time parameter and feeds back to the exploitation end.
Based on the above technical solution, in the selection of time method: the fiducial time by manually preset or The synchronization system time is configured.
Invention additionally discloses a kind of storage mediums, are stored thereon with computer program, the computer program is by processor The step of above-mentioned selection of time method is realized when execution.
Invention additionally discloses a kind of selection of time equipment, including memory, processor and it is stored on the memory simultaneously The computer program run on the processor, the processor realize above-mentioned selection of time when executing the computer program The step of method.
Invention additionally discloses a kind of selection of time system, which includes:
Fiducial time setting unit is used to preset fiducial time, and the fiducial time is user's local time;
Time segment unit is used to set multiple periods using fiducial time and by terminal of current time, and to every One period corresponding generation, one selection of time control;
Period return unit is used to return to the corresponding time according to the selection of time control that user selects Section.
Based on the above technical solution, selection of time system further include:
Time parameter generation unit is used to generate the time parameter for being used for selection of time according to the period;
Selection of time unit is used to carry out selection of time work according to the time parameter.
Based on the above technical solution, in selection of time system: including one time in the time parameter generation unit Letter of transfer number subelement;
The call back function subelement is used to obtain the time parameter and feeds back to the time parameter generation list Member.
Based on the above technical solution, in selection of time system:
The fiducial time is configured by the manually default or synchronization system time.
Compared with the prior art, the advantages of the present invention are as follows:
(1) present invention sets multiple periods using cooperation of pre-set fiducial time current time, and according to multiple Period generates selection of time space, returns to the corresponding period according to the selection of time control of client's selection;
Compared with prior art, the present invention can select reasonable time section, carry out accurately selection of time, operation letter It is single, it does not need user and carries out cumbersome operation.
Detailed description of the invention
Fig. 1 is the flow chart of selection of time method in the embodiment of the present invention;
Fig. 2 is the structural block diagram of selection of time equipment in the embodiment of the present invention;
Fig. 3 is the structural block diagram of selection of time system in the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described in further detail below in conjunction with attached drawing.
Shown in Figure 1, the embodiment of the present invention provides a kind of selection of time method, is used for client and carries out time choosing It selects, method includes the following steps:
Fiducial time is preset, fiducial time is user's local time;
Multiple periods are set using fiducial time and by terminal of current time, and to the corresponding generation one of each period Selection of time control;
The corresponding period is returned according to the selection of time control of user's selection.
In the present invention, according to different users, fiducial time is distinct, and fiducial time is used to be used as selection of time Basis, as a kind of reference data;
Multiple periods then provide the possibility of a variety of selection of time for user, the precision of period can according to actual needs into Row adjustment, and a selection of time control is generated since each period is corresponding, client only needs to select selection of time space, The corresponding period may be selected, to carry out selection of time work;
The present invention can select reasonable time section, carry out accurately selection of time, easy to operate, not need user's progress Cumbersome operation.
Wherein, the mode for generating fiducial time can be following steps:
A time component can be created in client, and the purposes of time component is available to user's accurately time hop counts Value, it is desirable to provide give component fiducial time, allow assembly initialization;
The initialization of component is as follows:
<RelativeTimePicker
From={ this.state.from }
Till={ this.state.till }
Loading={ this.state.loading }
OnChange=(from, till)=>
}}
/>
Wherein from is the time started, and till is end time, loading client adding when responding operator's event Carry animation, and onChange be then upon a selection of the user between after section finishes, numerical value is passed to the developer of time component Required call back function;
It is when the developer using component does not transmit from and till the two reference time values, then component is made Fiducial time is the local time in time zone where current operation client;
The above initialization mode allow time component using more flexible because when most of demands do not need to provide it is specified Time, then obtain and can meet the needs of users automatically by time component, while if there is special demand, then User can voluntarily specify Start Time value, thus can satisfy different demands.
In addition, providing the rule of a set period of time in the present embodiment:
After having the time value of benchmark, component it is also required to provide a series of rule come when component being allowed to generate different Between section.
Rule is defined as follows:
Static durations=[
{
last2Days:{
text:'Last 2days',
Expr:(date)=>
Const d=new Date (date);
return{
from:d.setDate(d.getDate()-2),
till:date,
};
},
},
last7Days:{
text:'Last 7days',
Expr:(date)=>
Const d=new Date (date);
return{
from:d.setDate(d.getDate()-7),
till:date,
};
},
},
last30Days:{
text:'Last 30 days',
Expr:(date)=>
Const d=new Date (date);
return{
from:d.setDate(d.getDate()-30),till:date,
};
},
},
last90Days:{
text:'Last 90 days',
Expr:(date)=>
Const d=new Date (date);
return{
from:d.setDate(d.getDate()-90),
till:date,
};
},
},
last6months:{
text:'Last 6months',
Expr:(date)=>
Const d=new Date (date);
return{
from:d.setMonth(d.getMonth()-6),
till:date,
};
},
,
}
In the realization of time component, rule has been defined as the static member for the class for realizing time component, this rule Static member is an array, and specific rule one by one is defined in array.Such as last2Days, apparent it can know Road this be the period a few days ago until obtaining at the beginning of the benchmark;
And the advantages of aforesaid way, is: rule being defined as the static member of class, has on the one hand allowed the reality of time component The principle in face of object is now deferred to, because rule is also a part of time component class, needs to encapsulate, still further aspect, due to Rule is that the example of all classes is shared, does not need to carry out special case, therefore be implemented as static member and more meet semanteme.
Also, the present embodiment gives one and generates method in different time periods according to above-mentioned rule and fiducial time:
After time component has received reference time value, the different periods can be generated according to rule;
Time component meeting traversal rule array first, from the member such as last2Days:{ of array
text:'Last 2days',
Expr:(date)=>
Const d=new Date (date);
return{
from:d.setDate(d.getDate()-2),
till:date,
};
},
},
The specific descriptions of this rule are obtained with from its text member.Then expr is called, fiducial time is transmitted (can be user's transmitting, be also possible to the current time that component is gone from afterwards automatically).Specific numerical value can be calculated, Wherein from and till constitutes the numerical value of period.It finally will be according to the panel of numerical generation HTML element plug-in package
<a
Key={ key }
Style={ { display:'block'} }
OnClick={ ()=> { this._clickHandler (duration.expr);}}
>
{duration.text}
</a>
Meanwhile event response function is added on element, when the corresponding HTML element of this time value is clicked, Component internal will use from the and till numerical value of this time interval to update internal state;
And the advantages of above-mentioned set-up mode, is, since rule provides unified member and calculates function, then in group When part circulation generates corresponding HTML element, so that it may more efficient, it is only necessary to unified to get time zone from text Between description, call expr transmitting fiducial time can acquisition time section specific value, and later period expansion time component When, it is only necessary to more periods can be added according to identical constraint.
In the present embodiment, selection of time method is further comprising the steps of:
It develops end and receives the period returned, and generate the time parameter for being used for selection of time;
It develops end and selection of time work is carried out according to time parameter.
And with specifically, selection of time method is further comprising the steps of;
A call back function is created, acquisition time parameter is used for and feeds back to exploitation end;
Specifically time parameter feeds back to the exploitation end i.e. mode of developer are as follows:
When user is after having selected selection of time control, the time component in client can be provided by developer From the and till two values of time component internal maintenance are passed to developer, to open by onChange call back function Hair personnel carry out further work;
And the mechanism of call back function is used, rather than allow the state of user's voluntarily acquisition time component internal, it thus is avoided that The encapsulation of time to rupture component, operates convenient for developer.
In the present embodiment, in selection of time method: fiducial time is configured by the manually default or synchronization system time.
The embodiment of the present invention provides a kind of storage medium, is stored thereon with computer program, computer program is by processor The step of above-mentioned selection of time method is realized when execution.
Shown in Figure 2, the embodiment of the present invention provides a kind of selection of time equipment, including memory, processor and storage The computer program run on a memory and on a processor, processor realize above-mentioned selection of time when executing computer program The step of method.
Shown in Figure 3, the embodiment of the present invention provides a kind of selection of time system, which includes:
Fiducial time setting unit is used to preset fiducial time, and fiducial time is user's local time;
Time segment unit is used to set multiple periods using fiducial time and by terminal of current time, and to every One period corresponding generation, one selection of time control;
Period return unit is used to return to the corresponding period according to the selection of time control that user selects.
In the present embodiment, selection of time system further include:
Time parameter generation unit is used to generate the time parameter for being used for selection of time according to the period;
Selection of time unit is used to carry out selection of time work according to time parameter.
In the present embodiment, in selection of time system: including a call back function subelement in time parameter generation unit;
Call back function subelement is used for acquisition time parameter and feeds back to time parameter generation unit.
In the present embodiment, in selection of time system:
Fiducial time is configured by the manually default or synchronization system time.
It should be understood that system provided by the above embodiment realize selection of time operation when, only with above-mentioned each function The division progress of module, can be complete by different function module by above-mentioned function distribution as needed for example, in practical application At the internal structure of system being divided into different functional modules, to complete all or part of the functions described above.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from Under the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as protection of the invention Within the scope of.
The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.

Claims (10)

1. a kind of selection of time method, which is characterized in that it is used for client and carries out selection of time, and this method includes following step It is rapid:
Fiducial time is preset, the fiducial time is user's local time;
Multiple periods are set using fiducial time and by terminal of current time, and to the corresponding generation one of each period Selection of time control;
The corresponding period is returned according to the selection of time control of user's selection.
2. selection of time method as described in claim 1, which is characterized in that this method is further comprising the steps of:
It develops end and receives the period returned, and generate the time parameter for being used for selection of time;
The exploitation end carries out selection of time work according to the time parameter.
3. selection of time method as claimed in claim 2, it is characterised in that: this method is further comprising the steps of;
A call back function is created, be used to obtain the time parameter and feeds back to the exploitation end.
4. selection of time method as described in claim 1, it is characterised in that: the fiducial time is by manually presetting or synchronizing System time is configured.
5. a kind of storage medium, is stored thereon with computer program, it is characterised in that: the computer program is executed by processor The step of any one of Shi Shixian the claims 1 to 4 the method.
6. a kind of selection of time equipment, including memory, processor and it is stored on the memory and on the processor The computer program of operation, it is characterised in that: the processor realized when executing the computer program the claims 1 to The step of any one of 4 the method.
7. a kind of selection of time system, which is characterized in that the system includes:
Fiducial time setting unit is used to preset fiducial time, and the fiducial time is user's local time;
Time segment unit is used to set multiple periods using fiducial time and by terminal of current time, and to each institute State one selection of time control of period corresponding generation;
Period return unit is used to return to the corresponding period according to the selection of time control that user selects.
8. selection of time system as claimed in claim 7, which is characterized in that the system also includes:
Time parameter generation unit is used to generate the time parameter for being used for selection of time according to the period;
Selection of time unit is used to carry out selection of time work according to the time parameter.
9. selection of time system as claimed in claim 8, which is characterized in that include one time in the time parameter generation unit Letter of transfer number subelement;
The call back function subelement is used to obtain the time parameter and feeds back to the time parameter generation unit.
10. selection of time system as claimed in claim 7, it is characterised in that:
The fiducial time is configured by the manually default or synchronization system time.
CN201810023300.XA 2018-01-10 2018-01-10 Time selection method, storage medium, equipment and system Active CN110018760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810023300.XA CN110018760B (en) 2018-01-10 2018-01-10 Time selection method, storage medium, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810023300.XA CN110018760B (en) 2018-01-10 2018-01-10 Time selection method, storage medium, equipment and system

Publications (2)

Publication Number Publication Date
CN110018760A true CN110018760A (en) 2019-07-16
CN110018760B CN110018760B (en) 2021-09-07

Family

ID=67188100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810023300.XA Active CN110018760B (en) 2018-01-10 2018-01-10 Time selection method, storage medium, equipment and system

Country Status (1)

Country Link
CN (1) CN110018760B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268784A1 (en) * 2006-05-17 2007-11-22 Hongtao Xu Alarm Clock Having Triple Weekly Alarms
CN102004632A (en) * 2009-09-01 2011-04-06 阿里巴巴集团控股有限公司 Method and device for setting time information
CN104598252A (en) * 2015-02-15 2015-05-06 北京恒华伟业科技股份有限公司 Time control as well as method for determining time based on time control

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070268784A1 (en) * 2006-05-17 2007-11-22 Hongtao Xu Alarm Clock Having Triple Weekly Alarms
CN102004632A (en) * 2009-09-01 2011-04-06 阿里巴巴集团控股有限公司 Method and device for setting time information
CN104598252A (en) * 2015-02-15 2015-05-06 北京恒华伟业科技股份有限公司 Time control as well as method for determining time based on time control

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FC行者如风: "最新版手机工商银行怎么查询账户明细", 《百度经验》 *

Also Published As

Publication number Publication date
CN110018760B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
US11061925B2 (en) Multi-task scheduling method and system, application server and computer-readable storage medium
US8204951B2 (en) Deterministic communication between graphical programs executing on different computer systems using variable nodes
CN103425778B (en) A kind of intelligent development platform of database application system
CN101166118B (en) A method for processing user configuration information and service report system
CN108965003A (en) A kind of dispositions method of distributed type assemblies, device, system and storage medium
CN107592238A (en) Automatic test approach and system, service terminal, the memory of interface
CN102222043A (en) Testing method and testing device
CN111090803A (en) Data processing method and device, electronic equipment and storage medium
CN104112156A (en) System and method for updating electronic shelf label and updating device and method thereof
CN109857452A (en) A kind of configuration method and device of the rocket launch vehicle measurement based on XML
CN111104450A (en) Target data importing method, medium, device and computing equipment
CN110324203B (en) Multichannel high accuracy network flow generates device
US9304963B2 (en) Data table structure for self-organized management of communication with functional modules coupled via backplane assembly based on received module description including control logic
CN109240932A (en) A kind of test method, device and the equipment of unified storage management software
CN110717620A (en) Order meal delivery time prediction method and device, electronic equipment and storage medium
CN110018760A (en) A kind of selection of time method, storage medium, equipment and system
CN106789978A (en) A kind of convergence system and method
CN104038518B (en) information processing method, server and terminal device
EP0389683A2 (en) Apparatus and method for regulating a measurement system
EP2777498B1 (en) Blood glucose monitoring system having wireless communication module to which time synchronization method is applied
CN112734404B (en) Iterative man-hour statistical method and device in research and development process and computer equipment
US20140041465A1 (en) Equipment test method and associated test tool and test system
CN104639456B (en) A kind of data sending control method and network interface card
CN101720156A (en) Method and system for generating monitoring interface of illumination control system and illumination control system
CN105100143A (en) Data display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant