[go: up one dir, main page]

JP2969973B2 - Time data comparison processor - Google Patents

Time data comparison processor

Info

Publication number
JP2969973B2
JP2969973B2 JP744691A JP744691A JP2969973B2 JP 2969973 B2 JP2969973 B2 JP 2969973B2 JP 744691 A JP744691 A JP 744691A JP 744691 A JP744691 A JP 744691A JP 2969973 B2 JP2969973 B2 JP 2969973B2
Authority
JP
Japan
Prior art keywords
time data
comparison
value
year
digits
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.)
Expired - Fee Related
Application number
JP744691A
Other languages
Japanese (ja)
Other versions
JPH04240590A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP744691A priority Critical patent/JP2969973B2/en
Publication of JPH04240590A publication Critical patent/JPH04240590A/en
Application granted granted Critical
Publication of JP2969973B2 publication Critical patent/JP2969973B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、西暦年の下位2桁を年
表示とする時刻データの比較、特に履歴情報に付随する
時刻データであって、1900年代と2000年代の年
表示が混在している場合に好適な時刻データ比較処理装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a comparison of time data in which the lower two digits of the year of the year are represented by a year, in particular, time data accompanying history information. Time data comparison processing device suitable for the

【0002】[0002]

【従来の技術】計算機に保持する履歴情報等には、事象
の発生時刻等を示す時刻データが付随して保管され、必
要な場合にその時刻データの示す時刻順に履歴情報を並
べる等の処理が必要になる。
2. Description of the Related Art History data and the like stored in a computer are stored with time data indicating the time of occurrence of an event and the like. When necessary, processing such as arranging the history information in the order of the time indicated by the time data is performed. Will be needed.

【0003】その場合には、当然時刻データ相互の大小
関係を識別する必要があるので、そのためには2つの時
刻データを比較して大小を判定することが基本的な処理
として実行される。
In such a case, it is naturally necessary to identify the magnitude relationship between the time data. For this purpose, a comparison of two time data to determine the magnitude is performed as a basic process.

【0004】ここで時刻データは、年、月、日、時、
分、秒を表す各数値を、上位桁からこの順に並べた数字
で表し、又年については西暦年の下2桁のみを使用して
年表示として、例えば「西暦1991年9月29日11時30分00
秒」を「910929113000」という時刻データとして保持す
る場合が多い。
Here, the time data includes year, month, day, hour,
Minutes and seconds are represented by numbers arranged in this order from the highest digit. For the year, only the last two digits of the year are used to represent the year, for example, "11:00 September 29, 1991 AD 30 minutes 00
In many cases, “second” is held as time data “910929113000”.

【0005】従って、時刻順に履歴情報を並べる等のた
めに時刻の前後を識別する場合には、時刻データの大小
を識別すればよく、その場合には時刻データをそのまゝ
12桁の数値として比較して、大小を判定することができ
る。なお、時刻データの長さは、精度の要求に応じて、
分までとか日までとする場合もある。
Therefore, in order to arrange the history information in the order of the time, when identifying before and after the time, it is sufficient to identify the magnitude of the time data, and in that case, the time data is not changed.
By comparing the values as 12-digit numbers, the magnitude can be determined. Note that the length of the time data depends on the accuracy requirement.
May be up to minutes or days.

【0006】[0006]

【発明が解決しようとする課題】西暦1900年代のみ
の時刻データの場合には、前記のような時刻データを前
記のようにして比較して、時刻の前後を識別することが
できる。しかし、西暦が2000年代になって、それま
でと同様にして時刻データが構成され、1900年代の
時刻データも残っている場合には、各同年代の時刻デー
タ相互の比較では矛盾は生じないが、両年代の時刻デー
タをそのまゝ比較すると、大小関係と時刻の前後とが逆
になる場合が生じる。
In the case of time data of only the 1900s in the Christian era, the time data as described above can be compared as described above to identify before and after the time. However, in the year 2000, when the time data is composed in the same way as before and time data of the 1900s remains, comparison of time data of the same age does not cause inconsistency, If the time data of both ages is compared as it is, the magnitude relationship may be reversed before and after the time.

【0007】それを避けるために、年表示の桁数を増や
すことは、既に大量の履歴情報が蓄積されている場合
に、それらの形式変更が極めて困難であり、又所要記憶
容量の増大を招く可能性がある。
To avoid this, increasing the number of digits of the year display makes it very difficult to change the format when a large amount of history information has already been stored, and also increases the required storage capacity. there is a possibility.

【0008】本発明は、従来の年表示の形式を保存し
て、1900年代と2000年代との混在する時刻デー
タを、年代を正しく識別して処理できる時刻データ比較
処理装置を目的とする。
An object of the present invention is to provide a time data comparing and processing apparatus capable of preserving a conventional year display format and processing time data in which the 1900s and 2000s are mixed by correctly identifying the era.

【0009】[0009]

【課題を解決するための手段】図1は、本発明の構成を
示すブロック図である。図は時刻データ比較処理装置の
構成を示し、最上位2桁を年表示とし、該年表示に西暦
年を表す数の下位2桁を使用する一定桁数の時刻データ
1、2の比較において、2個の比較バッファ3、4と処
理部5とを有し、各比較バッファ3、4を時刻データ
1、2の桁数より多い桁数に構成する。
FIG. 1 is a block diagram showing the configuration of the present invention. The figure shows the configuration of the time data comparison processing device. In the comparison of the time data 1 and 2 having a fixed number of digits using the two most significant digits as the year and using the lower two digits of the number indicating the year in the year display, It has two comparison buffers 3 and 4 and a processing unit 5, and each of the comparison buffers 3 and 4 is configured to have more digits than the digits of the time data 1 and 2.

【0010】処理部5は、比較すべき2個の時刻データ
1、2を、それぞれ各比較バッファ3、4の下位桁側に
詰めて設定し、各比較バッファ3、4ごとに、設定した
該時刻データの年表示値を、所定の基準値と比較して、
該比較結果により当該比較バッファの該年表示より上位
の桁の値を所定の補正値に補正する。
The processing unit 5 sets two pieces of time data 1 and 2 to be compared in the lower digits of each of the comparison buffers 3 and 4, respectively, and sets the time data for each of the comparison buffers 3 and 4. The year display value of the time data is compared with a predetermined reference value,
Based on the comparison result, a value of a digit higher than the year display in the comparison buffer is corrected to a predetermined correction value.

【0011】該補正値は、該年表示の値が該基準値より
小さい場合の値が、該基準値より小さくない場合の値よ
り大きくなるように定め、例えば年表示の値が基準値よ
り小さい場合に1とし、該基準値より小さくない場合に
0とする。
The correction value is determined so that a value when the value of the year display is smaller than the reference value is larger than a value when the value of the year display is not smaller than the reference value. For example, the value of the year display is smaller than the reference value. In this case, it is set to 1, and when it is not smaller than the reference value, it is set to 0.

【0012】処理部5は補正した比較バッファ3、4の
内容を比較した結果の大小判定を、該2個の時刻データ
の大小判定結果とする。
The processing unit 5 determines the magnitude of the result of comparing the corrected contents of the comparison buffers 3 and 4 as the magnitude of the two time data.

【0013】[0013]

【作用】本発明の比較処理装置により、例えば履歴情報
に含まれることのない古い1900年代の西暦年の下位
2桁の最大値を基準値に選べば、年表示を従来通り2桁
のまゝとしても、比較に際して年表示が基準値より小さ
い場合には、その時刻データの上位に例えば1を付加し
て補正することにより、基準値以上の大きな年表示を持
つ時刻データより大きな値にする。従って補正後の時刻
データを比較すれば、2000年代の時刻データは、1
900年代の時刻データより常に大きくなり、時刻の前
後関係と大小関係が従来と同様に維持される。
According to the comparison processing device of the present invention, for example, if the maximum value of the lower two digits of the year of the old 1900s, which is not included in the history information, is selected as the reference value, the year is displayed in the conventional two-digit format. However, if the year display is smaller than the reference value at the time of comparison, the time data is corrected by adding, for example, 1 to the upper position of the time data to make the time data larger than the time data having the year display larger than the reference value. Therefore, comparing the corrected time data, the time data of the 2000s is 1
The time data is always larger than the time data of the 900s, and the time order and the magnitude relation are maintained as in the past.

【0014】更に、この処理によれば、1900年代の
終わり近くから適当な基準値、例えば50を使用して20
50年に近くなった場合には、基準値を例えば0に変更
することのみにより、そのまゝ矛盾無く処理を継続でき
る。
Further, according to this processing, from the end of the 1900's, an appropriate reference value, for example, 50
When the age approaches 50 years, the processing can be continued without inconsistency by merely changing the reference value to, for example, 0.

【0015】[0015]

【実施例】前記例の12桁の時刻データを比較するものと
して、各比較バッファ3と4は、時刻データ分の6バイ
トの上位に1バイト長くした7バイト長とする。又、基
準値を50とする。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Assuming that the 12-digit time data of the above example is compared, each of the comparison buffers 3 and 4 has a 7-byte length that is 1 byte longer than 6 bytes of the time data. The reference value is set to 50.

【0016】図2は本発明の処理部5の処理の流れの一
例を示す図であり、先ず処理ステップ10で比較バッファ
3、4 (以下でバッファA、Bとする)を、0にリセッ
トする。
FIG. 2 is a diagram showing an example of the processing flow of the processing unit 5 of the present invention. First, in the processing step 10, the comparison buffers 3 and 4 (hereinafter, buffers A and B) are reset to 0. .

【0017】処理ステップ11で、比較する一方の時刻デ
ータ1 (時刻データAとする)をバッファAの下位側に
詰めてロードする。即ち、時刻データAが「9611302125
01」であれば、バッファAの内容は「00 96 11 30 21 2
5 01」になる。
In processing step 11, one of the time data 1 (time data A) to be compared is packed in the lower side of the buffer A and loaded. That is, the time data A is "9611302125
01 ", the contents of buffer A are" 00 96 11 30 21 2
5 01 ".

【0018】処理ステップ12で、時刻データAの年表示
2桁を基準値である50と比較し、50より小さければ処理
ステップ13でバッファAの再上位の1バイトに「01」を
設定する。従って前記例の場合にバッファAの内容は変
わらない。
In the processing step 12, the two digits of the year of the time data A are compared with the reference value of 50, and if it is smaller than 50, "01" is set in the upper one byte of the buffer A in the processing step 13 in the processing step 13. Therefore, the contents of the buffer A do not change in the case of the above example.

【0019】次に、処理ステップ14で、他方の時刻デー
タ2 (時刻データBとする)をバッファBの下位側に詰
めてロードする。即ち、時刻データBが「03092910030
0」であれば、バッファBの内容は「00 03 09 29 10 03
00」になる。
Next, in processing step 14, the other time data 2 (referred to as time data B) is packed in the lower side of the buffer B and loaded. That is, the time data B is "03092910030
If "0", the contents of buffer B are "00 03 09 29 10 03
00 ".

【0020】処理ステップ15で、時刻データBの年表示
2桁を基準値の50と比較し、50より小さければ処理ステ
ップ16でバッファBの再上位の1バイトに「01」を設定
する。従って前記例のバッファBの内容は、「01 03 09
29 10 03 00」になる。
In a processing step 15, the two digits of the year of the time data B are compared with a reference value of 50, and if it is smaller than 50, in a processing step 16, "01" is set to the upper one byte of the buffer B. Therefore, the content of buffer B in the above example is "01 03 09
29 10 03 00 ".

【0021】以上の補正処理の後、処理ステップ17でバ
ッファAとバッファBを比較し、その大小判定結果を処
理ステップ18で時刻データの比較結果として出力する。
従って前記例では、 (バッファA) < (バッファB) と
なることから、比較判定結果として、(時刻データA)
<(時刻データB)という結果が出される。
After the above correction processing, the buffer A and the buffer B are compared in a processing step 17 and the magnitude judgment result is output as a comparison result of the time data in a processing step 18.
Therefore, in the above example, since (buffer A) <(buffer B), (time data A)
<(Time data B) is obtained.

【0022】[0022]

【発明の効果】以上の説明から明らかなように本発明に
よれば、西暦年の下位2桁を年表示とする時刻データの
比較に関し、従来の年表示の形式を保存して、1900
年代と2000年代との混在する時刻データを、年代を
正しく識別して処理できるという著しい効果がある。
As is apparent from the above description, according to the present invention, the comparison of the time data in which the last two digits of the year are represented by the year is performed, and the conventional format of the year display is preserved to 1900.
There is a remarkable effect that time data in which the age and the 2000s are mixed can be correctly identified and processed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の構成を示すブロック図FIG. 1 is a block diagram showing the configuration of the present invention.

【図2】 本発明の処理の流れ図FIG. 2 is a flowchart of the process of the present invention.

【符号の説明】[Explanation of symbols]

1、2 時刻データ 3、4 比較バッファ 5 処理部 6 基準値 10〜18 処理ステップ 1, 2 time data 3, 4 comparison buffer 5 processing unit 6 reference value 10 to 18 processing steps

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 最上位2桁を年表示とし、該年表示に西
暦年を表す数の下位2桁を使用する一定桁数の時刻デー
タ(1、2)の比較において、2個の比較バッファ(3、4)と
処理部(5) とを有し、各該比較バッファ(3、4)を該時刻
データの桁数より多い桁数に構成し、該処理部(5) は、
比較すべき2個の該時刻データ(1、2)を、それぞれ各該
比較バッファ(3、4)の下位桁側に詰めて設定し、各該比
較バッファ(3、4)ごとに、設定した該時刻データの年表
示値を、所定の基準値(6) と比較して、該比較結果によ
り当該比較バッファの該年表示より上位の桁の値を所定
の補正値に補正し、該補正値は、該年表示の値が該基準
値より小さい場合の値が、該基準値より小さくない場合
の値より大きくなるように定め、該補正した該比較バッ
ファの内容を比較した結果の大小判定を、該2個の時刻
データの大小判定結果とするように構成されていること
を特徴とする時刻データ比較処理装置。
In a comparison of time data (1, 2) of a fixed number of digits using the upper two digits as a year and using the lower two digits of the number representing the year in the year, two comparison buffers are used. (3, 4) and a processing unit (5), each of the comparison buffers (3, 4) is configured to have a number of digits larger than the number of digits of the time data, and the processing unit (5) includes:
The two pieces of time data (1, 2) to be compared are set in the lower digits of each of the comparison buffers (3, 4), and are set for each of the comparison buffers (3, 4). The year display value of the time data is compared with a predetermined reference value (6), and a value of a digit higher than the year display in the comparison buffer is corrected to a predetermined correction value based on the comparison result. Is determined so that the value when the value of the year display is smaller than the reference value is larger than the value when the value is not smaller than the reference value, and determines the magnitude of the result of comparing the corrected contents of the comparison buffer. A time data comparison processing device configured to obtain a magnitude determination result of the two time data.
【請求項2】 前記補正値を、前記年表示の値が前記基
準値より小さい場合に1とし、該基準値より小さくない
場合に0とする、請求項1記載の時刻データ比較処理装
置。
2. The time data comparison processing device according to claim 1, wherein the correction value is set to 1 when the value of the year display is smaller than the reference value, and set to 0 when the value is not smaller than the reference value.
JP744691A 1991-01-25 1991-01-25 Time data comparison processor Expired - Fee Related JP2969973B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP744691A JP2969973B2 (en) 1991-01-25 1991-01-25 Time data comparison processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP744691A JP2969973B2 (en) 1991-01-25 1991-01-25 Time data comparison processor

Publications (2)

Publication Number Publication Date
JPH04240590A JPH04240590A (en) 1992-08-27
JP2969973B2 true JP2969973B2 (en) 1999-11-02

Family

ID=11666069

Family Applications (1)

Application Number Title Priority Date Filing Date
JP744691A Expired - Fee Related JP2969973B2 (en) 1991-01-25 1991-01-25 Time data comparison processor

Country Status (1)

Country Link
JP (1) JP2969973B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3579574B2 (en) 1997-10-01 2004-10-20 富士通株式会社 INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING SYSTEM, ACCELERATION ERROR CORRECTION METHOD FOR INFORMATION PROCESSING DEVICE, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING ACCEPTANCE PROGRAM

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2789670B2 (en) 1989-05-09 1998-08-20 富士通株式会社 A century identification method and apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2789670B2 (en) 1989-05-09 1998-08-20 富士通株式会社 A century identification method and apparatus

Also Published As

Publication number Publication date
JPH04240590A (en) 1992-08-27

Similar Documents

Publication Publication Date Title
CN111190895A (en) Method and device for organizing columnar storage data and storage medium
JP2969973B2 (en) Time data comparison processor
BE1003890A6 (en) Process database conversion.
JP2789670B2 (en) A century identification method and apparatus
JPS61278932A (en) Method of processing data addition
JPS642970B2 (en)
JP2004206631A (en) Search tuning method and information search system
CN116644076A (en) Database integration method and device, electronic equipment and storage medium
JP3014107B2 (en) Conflict resolution method for information processing system
JPS6027018A (en) Voice input system
JPS62121532A (en) Data search method
JPH04205173A (en) Information retrieval system
JPH0667966A (en) File transfer system
JPS5824822B2 (en) How to access data memory block
JP2507399B2 (en) Database equipment
JPS603035A (en) Storage device
JPS6167123A (en) File access control method
JP3318754B2 (en) File update processor
JPH0231425B2 (en)
JPS61281368A (en) Picture information retrieving device
JPS63148345A (en) Data managing system
JPH0364904B2 (en)
JPH05274184A (en) Execution result comparing device
JPS6217849A (en) Data logging method
JPS6323576B2 (en)

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990727

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080827

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090827

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees