JP2008537189A5 - - Google Patents

Download PDF

Info

Publication number
JP2008537189A5
JP2008537189A5 JP2007547644A JP2007547644A JP2008537189A5 JP 2008537189 A5 JP2008537189 A5 JP 2008537189A5 JP 2007547644 A JP2007547644 A JP 2007547644A JP 2007547644 A JP2007547644 A JP 2007547644A JP 2008537189 A5 JP2008537189 A5 JP 2008537189A5
Authority
JP
Japan
Prior art keywords
calendar
year
chinese
month
date
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.)
Pending
Application number
JP2007547644A
Other languages
Japanese (ja)
Other versions
JP2008537189A (en
Filing date
Publication date
Priority claimed from GBGB0428117.6A external-priority patent/GB0428117D0/en
Application filed filed Critical
Publication of JP2008537189A publication Critical patent/JP2008537189A/en
Publication of JP2008537189A5 publication Critical patent/JP2008537189A5/ja
Pending legal-status Critical Current

Links

Description

ユリウス暦の日と中国暦の日付とを変換するための計算機とその方法Calculator and method for converting Julian day and Chinese date 詳細な説明Detailed description

本発明は、ユリウス日(Julian Calendar)の番号と中国暦(Chinese Calendar)の日付との間で変換を行う方法及びそのような変換を実行するための計算機に関する。 The present invention relates to a computer for performing the method and such a transformation for converting between Julian dates day numbers and Chinese calendar (Julian Calendar) (Chinese Calendar) .

ここで使用される計算機という用語は、任意の形式の電子計算機(electrical computing device)を包含するように拡張して解釈され、データ記録装置、携帯情報端末(PDA)等の携帯用パーソナルコンピュータを含む任意のタイプ又は形式のコンピュータ、携帯電話、スマートフォン、単一装置内に通信、画像記憶及び/又は再生、計算機能を兼ね備えた発信機(communicators)を含む任意の形式要素(form factor)を持つ通信装置、及びデジタルカメラ、MP3、他の音楽プレーヤー及びデジタルラジオを含む他の形式の無線及び有線の情報装置を包含する。   The term computer as used herein is interpreted to extend to encompass any form of electronic computing device and includes portable personal computers such as data recording devices, personal digital assistants (PDAs), etc. Communication with any form factor, including any type or form of computer, mobile phone, smart phone, communicators that combine communication, image storage and / or playback, and computing capabilities within a single device Devices and other types of wireless and wired information devices including digital cameras, MP3s, other music players and digital radios.

中国暦は、非常に複雑である。中国暦は、標準の世俗的な(secular)グレゴリオ暦などの純粋な太陽暦ではない。太陽暦は、太陽の1年の周期(cycle)に基づいており、季節が毎年ほぼ同じ日付に現れることを保証する。純粋な太陽暦の欠点は、1ヶ月を通じて月の相が変わり、1ヶ月における特定の日付と関連していないことである。 The Chinese calendar is very complex. The Chinese calendar is not a pure solar calendar, such as the standard secular Gregorian calendar. The solar calendar is based on the solar cycle of the year and ensures that the seasons appear on approximately the same date every year. The disadvantage of a pure solar calendar is that the phase of the moon changes throughout the month and is not associated with a specific date in the month.

中国暦(Chinese Calendar)でもムスリム暦(Muslim calendar)などの純粋な陰暦(lunar calendar)でもない。陰暦は、月の1ヶ月の周期を基づいて、その相が各月の同じ日に一致することを保証する。純粋な陰暦の欠点は、1年を通じて季節が変わってしまい、どの月とも関連していないことである。 It is neither a Chinese calendar nor a pure lunar calendar such as the Muslim calendar. The lunar calendar ensures that the phases coincide on the same day of each month, based on the period of one month of the month. The disadvantage of a pure lunar calendar is that the season changes throughout the year and is not related to any month.

中国暦は、太陰太陽暦(lunisolar calendar)である。これらは、その月が月の周期に基づいているという点において、陰暦と同様であるので、その相は各月の同じ日に一致する。しかしながら、これらはまた、各年のほぼ同じ月に年に毎年の季節ごとの出来事が起こることを必要とする点において、太陽と関連している。この条件は、2年ごと又は3年ごとにうるう月を挿入することによって満足され、月と太陽の要素(components)は実質的に同期することが保証される。 The Chinese calendar is the lunisolar calendar. These are similar to the lunar calendar in that the month is based on the lunar cycle, so the phases coincide with the same day of each month. However, they are also associated with the sun in that they require that every season of the year occur in the year in approximately the same month of each year. This condition is satisfied by inserting a leap moon every two or three years, ensuring that the moon and sun components are substantially synchronized.

中国暦は、このタイプの唯一のカレンダーでなく、イスラエルで使用され、伝統的な目的でユダヤ人によって使用されているヘブライカレンダー(Hebrew calendar)も月と太陽の(lunisolar)タイプである。しかしながら、複雑な中国暦と異なり、ヘブライカレンダーは、計算機の処理が比較的易しい。これは、1000年をはるかに超える独立した規則に基づくカレンダーであり、任意の外部の天文学的データを確認する必要がないからである。例えば、1ヶ月の長さは固定されている、そして、うるう月が必要な場合には、その年の最初の月の前に常に現れる。その結果、ある期間の経過後の日付を知ること、又はユダヤ暦の日付とグレゴリオ暦の日付との間で変換を行うことは、簡単な処理である。 The Chinese calendar is not the only calendar of this type, but the Hebrew calendar used in Israel and used by the Jews for traditional purposes is also the lunisolar type. However, unlike the complicated Chinese calendar , the Hebrew calendar is relatively easy to process on a computer. This is because it is a calendar based on independent rules far beyond 1000, and there is no need to check any external astronomical data. For example, the length of a month is fixed, and if a leap month is needed, it always appears before the first month of the year. As a result, knowing the date after a certain period or converting between the Jewish date and the Gregorian date is a simple process.

中国暦は、非常に異なっている。IBMは、「うるう年が非常に簡単に計算でき、1年の同じ時期に常にうるう月(intercalary month)が常に現れるヘブライカレンダーと異なり、天体観測と非常に複雑な計算に基づいて、中国暦のうるう年とうるう月が計算される」と指摘している
(http://www-306.ibm.com/software/globalization/topics/locales/calendar_chinese.jsp)。
The Chinese calendar is very different. According to IBM, “The leap year of the Chinese calendar is based on astronomical observations and very complex calculations, unlike the Hebrew calendar, where the leap year can be calculated very easily and the intercalary month always appears at the same time of the year. "The leap month is calculated" (http://www-306.ibm.com/software/globalization/topics/locales/calendar_chinese.jsp).

中国暦を扱う際に直面する根本的な問題は、その規則が独立していないということであり、任意の単純な近似よりも、実際の天文学データが重要であり(supreme)、規則が行うすべてのことは、特定の天文学の出来事が起こるときに何が起こるかを表すことである。問題とされている重要な天文学の出来事は、太陽と月(新月(dark moon)として知られている)の合(conjunction)の正確な時刻と、太陽の経線が春分点(zhongqiとして知られている)から測定して正確に30度の倍数を横切る日である。 The fundamental problem faced when dealing with the Chinese calendar is that the rules are not independent, the actual astronomical data is more important than any simple approximation (supreme), and everything the rules do It represents what happens when a particular astronomical event occurs. The important astronomical events at issue are the exact time of the conjunction of the sun and the moon (known as the dark moon) and the solar meridian known as the equinox (zhongqi It is a day that accurately crosses a multiple of 30 degrees.

これは比較的容易であるように思えるが、実際の天文学の出来事がカレンダー演算にもたらす困難は過小評価されやすい。データは、実際には非常に複雑であり、ほとんどの人々は、太陽と月の動きは実際にはかなり不規則であり、1日の長さと1ヶ月の長さとが1年間(ある年から次の年までも)で変化することを知らない。カレンダー計算を実行するときに、中国暦は、(西洋のグレゴリオ暦で使用される1日24時間などの平均値、又はヘブライカレンダーで大部分の年に使用される交互に起こる29日間の月と30日間の月よりもむしろ)このような区間に対する真の値を常に使用する。 While this seems to be relatively easy, the difficulty that actual astronomical events bring to calendaring is easily underestimated. The data is actually very complex and most people find that the movement of the sun and the moon is actually quite irregular, and the length of the day and the length of the month is one year (from one year to the next Do not know that will change in the years). When performing the calendar calculation, the Chinese calendar (with an average value such as 24 hours a day used in the Western Gregorian calendar, or an alternating 29-day month used for most years in the Hebrew calendar) Always use the true value for such an interval (rather than a 30-day month).

真の太陽と真の月を用いることによって、カレンダーを計算するために予め必要な計算が非常に複雑となる。これは、どの月も決まった長さを持たず、うるう月が1年のどの時点でも起こりうることを意味する。現在の月の長さ又は翌月の名前の何れかを知る簡単な方法がないため、現在から6週間後の日付を知ることなど、西洋のグレゴリオ暦の使用者にとって当然の演算が、予め計算されたカレンダーテーブルへのアクセスと参照なしでは非常に困難となる。中国暦の日付と他の日付(特に、グレゴリオ暦)と間の変換を扱う場合も同様である。 By using the true sun and true moon, the calculations required in advance to calculate the calendar become very complex. This means that no month has a fixed length and a leap month can occur at any point in the year. Since there is no easy way to know either the current month length or the name of the next month, the operations that are natural for users of the Western Gregorian calendar, such as knowing the date six weeks from now, are pre-calculated. It becomes very difficult without access and reference to the calendar table. The same is true when dealing with conversions between Chinese dates and other dates (especially the Gregorian calendar).

更に、2万5800年ごとの一連の分点(equinoxes)、11万年ごとの地球の軌道の回転、及び1日2ミリ秒の地球の回転の減速は、この天文学データが常に1つしか存在せず、中国暦が他の非天文学なカレンダーと関連して繰り返し現れるものではないことを意味する。 In addition, a series of equinoxes every 25800 years, rotation of the Earth's orbit every 110,000 years, and slowing down the Earth's rotation every 2 milliseconds per day, there is always only one astronomical data. Without, it means that the Chinese calendar does not appear repeatedly in connection with other non-astronomical calendars.

要するに、任意の中国暦の日付を扱うときに、複雑な計算の使用を避ける方法はない。 In short, there is no way to avoid the use of complex calculations when dealing with any Chinese calendar date.

1949年以来、南京の紫金山天文台(Purple Mountain Observatory)は、中国暦における日付を決定する責任を担っている。しかしながら、中国暦を利用することを望む計算機は、Edward M. ReingoldとNachum Dershowitzによって開発された、事実上の正準方程式(de-facto canonical equations)を利用できる。このような計算機は、彼らの著書「Calendrical Calculations」(Millenium版、ケンブリッジ大学出版局、2001年8月発行、ISBN:0521777526)の様々な版に見られる。 Since 1949, the Nanjing Purple Mountain Observatory has been responsible for determining dates in the Chinese calendar . However, computers that wish to use the Chinese calendar can use de-facto canonical equations developed by Edward M. Reingold and Nachum Dershowitz. Such calculators can be found in various editions of their book “Calendrical Calculations” (Millenium Edition, Cambridge University Press, August 2001, ISBN: 0521777526).

中国暦の日付でカレンダー計算を行う標準的な方法は、対応するユリウス日を中間状態として用いることによる。ユリウス日は、グレゴリオ暦以前のユリウス暦と混同しないように、紀元前(西暦紀元前)4713年1月1日から起算する日付の連番であり、特に、天文学者により広く用いられる。ユリウス日は、グレゴリオ暦が1582年に導入された直後に、フランスのJ.J.Scaligerによって発明され、負の数を使用する必要がなく、カレンダーとは無関係に任意の歴史的上の日を一意に参照する方法を提供する。 The standard way of performing calendar calculations with Chinese dates is by using the corresponding Julian date as an intermediate state. The Julian day is a serial number starting from January 1, 4713 BC (E.C.) so as not to be confused with the Julian calendar before the Gregorian calendar, and is widely used especially by astronomers. The Julian Day was invented by the French JJScaliger shortly after the introduction of the Gregorian calendar in 1582 and does not require the use of negative numbers and uniquely references any historical day regardless of the calendar Provide a method.

ReingoldとDershowitzの方程式は、ユリウス日の番号から任意のカレンダーの任意の日付、及び、任意のカレンダーの任意の日付からユリウス日の番号への変換を可能にする。中国暦に適用すると、これらの方程式は、任意の他のカレンダーシステムから、及び、任意の他のカレンダーへの変換を可能とする。これらの方程式によって、更に、中国暦の日付で算術演算を実行することができ、例えば、2つの任意の中国暦の日付間の日数を求めるために必要なすべてのことは、それらをユリウス日に変換し、算術比較を行うことだけである。 The Reingold and Dershowitz equations allow conversions from Julian day numbers to any date in any calendar, and from any date in any calendar to Julian day numbers. When applied to the Chinese calendar , these equations allow conversion from and to any other calendar system. These equations also allow arithmetic operations to be performed on Chinese dates, for example, all that is necessary to find the number of days between two arbitrary Chinese dates is to convert them to Julian dates. It only converts and performs arithmetic comparisons.

中国暦の複雑さに関する詳しい情報は、シンガポール国立大学数学科のHelmer Aslaksenの論文に紹介されており、「The Methematics of the Chinese Calendar」というタイトルで紹介されており、同著者の多数の他の論文とともに、
http://www.math.nus.edu.sg/aslaksen/calendar/chinese.shtml
に見つけられる。
More information on the complexity of the Chinese calendar is introduced in a paper by Helmer Aslaksen at the Department of Mathematics at the National University of Singapore, which is featured under the title “The Methematics of the Chinese Calendar” and many other papers by the author. With
http://www.math.nus.edu.sg/aslaksen/calendar/chinese.shtml
Can be found.

現代の計算機は、カレンダーの情報とデータを含むことが知られている。これは、予定表(Agenda)やスケジューリングソフトなどの個人情報管理(PIM)タイプのソフトウェアに最も顕著である。このような計算機の多くの使用者は、異なるカレンダーシステム間で変換を行う必要はないが、これは、多文化環境(multi-cultural environments)で演算を行う使用者には当てはまらない。IBMによれば、「世界的な使用を目的とした成功したソフトウェアを作成するためには、日付や時間から数の形式までに及ぶ現地の詳細な事項に注意する必要がある」。   Modern computers are known to contain calendar information and data. This is most noticeable for personal information management (PIM) type software such as calendars (Agenda) and scheduling software. Many users of such calculators do not need to convert between different calendar systems, but this is not the case for users operating in multi-cultural environments. According to IBM, "in order to create successful software for global use, you need to be aware of local details ranging from date and time to number formats."

本発明は、特に、その所有者が下記のタスクを実行する必要がある計算機の一般的な場合に関する。
・ どの日が30日の時点にあるかを求めることなど、中国暦の日付に算術演算を実行すること。
中国暦とグレゴリオ暦の両方のフォーマットで一貫性があるカレンダーデータを保持すること。
中国暦と任意の他のカレンダーとで一貫性があるカレンダーデータを保持すること。
The present invention particularly relates to the general case of a computer whose owner needs to perform the following tasks:
• Perform arithmetic operations on dates in the Chinese calendar , such as determining which day is on the 30th.
• Maintain consistent calendar data in both Chinese and Gregorian calendar formats.
• Maintain consistent calendar data between the Chinese calendar and any other calendar.

このような計算機の種類は、近年増加しており、現在では、デスクトップコンピュータに加え、携帯電話や携帯情報端末(PDAとして知られている)などの装置を含む。更に、技術が一体化されるにつれて、ゲーム機や音楽プレーヤーなどの装置もPIM機能を含むようになりつつある。中国暦が主要なカレンダーであるか、又は広く用いられているところにおいて、これらの装置を使用者が操作を行う場合、中国暦の日付における算術演算と、西洋のグレゴリオ暦の日付への又は該日付からの変換とが、PIM機能を十分に利用するために必要とされる。 The types of such computers have increased in recent years and now include devices such as mobile phones and personal digital assistants (known as PDAs) in addition to desktop computers. Furthermore, as technology is integrated, devices such as game consoles and music players are also including PIM functions. Where the Chinese calendar is the primary calendar or is widely used, when users operate these devices, arithmetic operations on the Chinese calendar date and the Western Gregorian date or Conversion from date is required to fully utilize the PIM function.

しかしながら、上述したReingoldとDershowitzの方程式は、地球、月及び太陽の相対位置をモデル化する必要があり、計算効率が悪いことが知られている。また、完了までの時間が長いだけではなく、天文学データの大きなテーブルを常に参照する必要がある。中国暦の日付と他のカレンダーとの間の変換アルゴリズムを実行する任意の計算機は、CPU負荷と必要メモリによって制約される。これは、携帯電話やPDAと比べて、比較的大きな計算リソースが必要であるため、デスクトップシステムのソフトウェアにさえ、問題を引き起こすことも知られている。例えば、
http://homepage.mac.com/rabbel/.cv/rabbel/Public/PDF's%20and%20Doc<1>s/C alendar%20System%20Facts%20V2.pdf-link.pdf
に見つけられるDenis A. Elliottの「Calendar System Facts」という論文を参照されたい。Elliotは、多数の異なるカレンダーシステム間で日付の変換を計算する「Intercal」と呼ばれるアップルマッキントッシュプログラムの作者であり、「膨大な数の浮動小数点計算が必要となる」ことを非常に明確に示している。Elliotは、特に、デザイン制約の1つとして、方程式の大きなCPU負荷について言及している。
However, the Reingold and Dershowitz equations described above need to model the relative positions of the earth, moon and sun, and are known to be inefficient. In addition to the long time to completion, it is necessary to always refer to a large table of astronomy data. Any computer that performs a conversion algorithm between Chinese calendar dates and other calendars is constrained by CPU load and memory requirements. This is known to cause problems even for desktop system software because it requires relatively large computational resources compared to mobile phones and PDAs. For example,
http://homepage.mac.com/rabbel/.cv/rabbel/Public/PDF's%20and%20Doc<1>s/C alendar% 20System% 20Facts% 20V2.pdf-link.pdf
See Denis A. Elliott's "Calendar System Facts" paper found at. Elliot is the author of an Apple Macintosh program called "Intercal" that calculates date conversions between many different calendar systems, showing very clearly that "a huge number of floating point calculations are required". Yes. Elliot specifically mentions the high CPU load of the equation as one of the design constraints.

スマートフォン(smartphones)やPDAなどの携帯機器は、制限された動作メモリ、限定された記憶容量、より低速なプロセッサ及び限られた量のバッテリーパワーという点において、デスクトップPCやラップトップPCなどの大きな「固定」計算機と比べて、一般にリソースが制約される。しかしながら、これらの所有者と使用者は、大部分の演算に対し、リソース制約のないデスクトップPCから期待されるものと同程度の、高速なサブセカンド(sub-second)応答を期待する。   Mobile devices such as smartphones and PDAs are large “desktop” and laptop PCs in terms of limited operating memory, limited storage capacity, slower processors and limited battery power. Compared to “fixed” computers, resources are generally limited. However, these owners and users expect a fast sub-second response for most operations, similar to that expected from a desktop PC with no resource constraints.

中国暦の日付に関する演算に対し、ReingoldとDershowitzの方程式などの標準的な方法を使用すると、それらが固定装置に対して行うよりも、これらのリソースが制約された携帯機器に対し、より多くの重大な問題が生じるであろう。遅い動作につながる集中的な計算及び多量のテーブルデータに必要な条件はともに、結果として、使いやすいことと、このようなリソースが制約された装置上でデュアルカレンダー(dual-calendar)が可能なPIMシステムを広く採用することに対し、大きな障害となる。 Using standard methods such as the Reingold and Dershowitz equations for operations on dates in the Chinese calendar , more for these resource-constrained portable devices than they do for fixed devices. Serious problems will arise. Both the intensive calculations that lead to slow operation and the requirements for large amounts of table data result in ease of use and PIM that allows dual-calendar on such resource-constrained devices This is a major obstacle to the wide adoption of the system.

そのため、CPUへの負担が少ない、中国暦データに関する計算演算の処理方法が求められている。 For this reason, there is a need for a processing method for calculation operations related to Chinese calendar data that places little burden on the CPU.

従って、本発明の目的は、CPU負荷が少なく、浮動小数点演算を伴わず、大量のメモリを必要としない、中国暦データに関するコンピュータ演算を扱う改良された方法を提供することである。従って、本発明は、リソース制約のある携帯機器に理想的かつ特に適しており、そのような装置で使用されたときに大きな技術上の利益を提供する。しかしながら、以下の詳細な説明から明らかなように、本発明は、リソース制約のより少ない「固定された」計算機に対しても、技術上の利益を提供するものである。これらの「固定された」計算機には何れも、任意の計算機におけるCPU負荷が少ない方法が、適度な少量の電力を使用し、動作が速く、結果として、環境に優しいという事実はなかった。 Accordingly, it is an object of the present invention to provide an improved method of handling computer operations on Chinese calendar data that is less CPU intensive, does not involve floating point operations, and does not require a large amount of memory. Thus, the present invention is ideal and particularly suitable for resource-constrained portable devices and provides significant technical benefits when used in such devices. However, as will be apparent from the detailed description below, the present invention also provides technical benefits for "fixed" computers with less resource constraints. None of these “fixed” computers had the fact that a method with a low CPU load on any computer uses a moderate amount of power, is fast to operate and, as a result, is environmentally friendly.

本発明の第1の側面は、中国暦の日付とユリウス日の番号とをある範囲で変換するための計算機の演算方法に係り、a.前記範囲内に含まれる中国暦の各年の月の長さと、b.もしあれば、前記範囲内に含まれる中国暦の各年のどの月がうるう月であるかと、c.前記範囲内の共通の日に対するユリウス日の番号と中国暦の日付データの少なくとも1組と、を示す前記計算機の情報をメモリに記憶させる工程と、前記計算機の中央演算処理装置(CPU)が前記記憶された情報を用いて前記中国暦の日付と前記ユリウス日の番号との間で変換を行うようにする工程と、を含むことを特徴とする。 A first aspect of the present invention relates to a calculation method of a computer for converting a Chinese calendar date and a Julian day number within a certain range, and a. The length of the month of each year of the Chinese calendar included in the range; b. If there is a leap month in each year of the Chinese calendar included in the range; c. Storing information of the computer in a memory indicating a Julian day number and at least one set of Chinese calendar date data for a common day in the range; and a central processing unit (CPU) of the computer Converting between the Chinese calendar date and the Julian day number using stored information.

本発明の第2の側面は、計算機に係り、前記第1の側面に係る方法に従って演算するように構成されていることを特徴とする。   According to a second aspect of the present invention, there is provided a computer, wherein the calculation is performed according to the method according to the first aspect.

本発明の第3の側面は、オペレーティングシステムに係り、前記第1の側面に係る方法に従って計算機に演算させることを特徴とする。   According to a third aspect of the present invention, there is provided an operating system, wherein a computer is operated according to the method according to the first aspect.

本発明の実施形態は、添付図面を例示的なものとして参照して以下に説明される。   Embodiments of the present invention are described below with reference to the accompanying drawings by way of example.

図1は、任意の中国暦の年に発生する29日間の月と30日間の月とを決定する処理を示す図であり、図2は、本発明に係るユリウス日の番号と中国暦の日付との間の変換処理を示す図である。 FIG. 1 is a diagram showing a process for determining a 29-day month and a 30-day month occurring in an arbitrary Chinese calendar year, and FIG. 2 is a Julian day number and a Chinese calendar date according to the present invention. It is a figure which shows the conversion process between.

まず、本発明を理解するために、上述の問題を解決するために、なぜルックアップテーブル(lookup tables)が広く使われていないかについて説明する必要がある。装置に関する時間周期(a period of time)が合理的に決定されうる技術において、当業者が考えうることは、ReingoldとDershowitzの方程式により急いで計算を行うことに代えて、予め計算を実行し、その結果である毎日の中国暦データを、装置内に保持された順序リスト内に配置することである。これにより、単純なルックアップテーブルを用いて、中国暦の日付に関する任意のカレンダー演算に対する答えを探し出すことができる。 First, in order to understand the present invention, it is necessary to explain why lookup tables are not widely used in order to solve the above problems. In a technique where a period of time for a device can be reasonably determined, one of ordinary skill in the art could perform the calculation in advance, instead of performing the calculation quickly with the Reingold and Dershowitz equation, The resulting daily Chinese calendar data is placed in an ordered list held in the device. This makes it possible to find the answer to any calendar operation on the Chinese calendar date using a simple lookup table.

このタイプのルックアップテーブルが、問題の実行可能な解決策ではないのは、データ量が大きすぎるからである。   This type of lookup table is not a viable solution to the problem because the amount of data is too large.

中国暦の日付は、最低でも、以下の5つの独立した日付要素からなる。 A Chinese calendar date consists of at least five independent date elements:

・ 周期(各周期は、60年)
・ その周期の年
・ その年の月
・ 月がうるう月か否か
・ その月の日付
従来のデータ構造でこれを記憶するためには、5つの整数が必要であり、計算機の多くが32ビットの整数を利用するため、標準的なルックアップテーブルは、1日20バイト(5×32=160整数)又は1年で7Kバイトを超えることが必要となるであろう。そのオーバーヘッドは、急激に増大する。例えば、装置が、最低限、1980年から2100年(グレゴリオ暦)の範囲の年で日付を扱うことができることが要求されていると仮定する。この120年の範囲は、43,830日にわたり、約856Kバイトのデータの変換オーバーヘッドを生じさせる。スマートフォン又はPDA装置内のROM(リードオンリーメモリ)の共通サイズは、8メガバイトであり、明らかに、単一のカレンダーテーブルによって、この貴重かつ重要なリソースの10%以上を占めるのは、実用的ではなく、許容されない。
・ Period (each period is 60 years)
-Year of the cycle-Month of the year-Whether the month is a leap month-Date of the month To store this in the traditional data structure, 5 integers are needed, and many computers are 32-bit Standard lookup tables would need to exceed 20 bytes per day (5 × 32 = 160 integers) or 7 Kbytes per year. The overhead increases rapidly. For example, assume that a device is required to handle dates in years that range from 1980 to 2100 (Gregorian calendar) at a minimum. This 120-year range produces a conversion overhead of about 856 Kbytes of data over 43,830 days. The common size of ROM (read-only memory) in a smartphone or PDA device is 8 megabytes, and obviously a single calendar table occupies over 10% of this valuable and important resource in practice. Not acceptable.

このテーブルデータの多少の最適化が可能であることは確かである。データ構造を圧縮し、余分な情報を取り除くことができる(例えば、120年の期間内に最大で3つあるときに、全サイクルを保存するなど)。これは、単一の32ビット整数で中国暦の日付の全てを記憶することができ(データを参照するときに非効率なコストで(at an inefficiency cost))、その結果、80%だけオーバーヘッドが減少するであろう。これは、上述の120年の期間のサンプルに対し、ROMオーバーヘッドが非常に小さい約171Kバイトのデータを与える。 Certainly some optimization of this table data is possible. The data structure can be compressed and extra information can be removed (eg, save the entire cycle when there are a maximum of 3 in a 120 year period). It can store all of the Chinese calendar dates in a single 32-bit integer (at an inefficiency cost when referring to the data), resulting in an overhead of only 80% Will decrease. This gives about 171 Kbytes of data with very little ROM overhead for the 120 year period sample mentioned above.

これは大きな改良であるが、実際は、携帯機器のリードオンリーメモリ(ROM)内のスペースは、非常にコストがかかる。中国暦ではない固定型のカレンダー(non-Chinese fixed calendars)と同程度のオーバーヘッドが事実上ゼロであれば、テーブル主導型のアプローチを採用することは、中国暦の機能を使用可能な装置のバージョンが、より大きなROM(NANDフラッシュ技術を用いた装置の生産コストとブート時間の増加につながる)或いは機能の縮小(ユーザが質の低下を感じる)持つ必要があることを、必然的に意味するであろう。 Although this is a great improvement, in practice, the space in the read-only memory (ROM) of a portable device is very costly. If China on no fixed calendar (non-Chinese fixed calendars) and comparable overhead facts calendar zero, adopting the approach of the table-driven version of the device that can use the functions of the Chinese calendar Inevitably means that you need to have a larger ROM (which leads to increased production costs and boot time for devices using NAND flash technology) or reduced functionality (users feel quality degradation). I will.

これらの理由により、テーブル主導型の効率的なアプローチは、リソース制約のある携帯機器ではこれまで実施されていない。   For these reasons, a table-driven efficient approach has not been implemented in resource-constrained portable devices.

しかしながら、本発明は、予めコンパイルされた中国暦情報のオーバーヘッドが、1日20バイトのオリジナルの実質的に「最適化された」オーバーヘッドから、1年でわずか6バイトのわずかなオーバーヘッドまで抑えられることを可能にし、大きな技術上の利益を提供する。従って、上述の120年の期間の場合、856Kバイトのオリジナルの必要メモリからちょうど0.7Kバイトの必要メモリまで減少される。 However, the present invention reduces the overhead of pre-compiled Chinese calendar information from the original substantially “optimized” overhead of 20 bytes per day to as little as 6 bytes per year. And provide great technical benefits. Thus, for the 120-year period described above, the original required memory of 856 Kbytes is reduced to just 0.7 Kbytes of required memory.

テーブルオーバーヘッドの99.9%を超えるこの減少は、データオーバーヘッドを80%ほど減少させるだけである先の最適化されたデータ圧縮方法よりも明らかにはるかに優れており、装置内の大きくて扱いにくいデータテーブルを含む必要なしに、ReingoldとDershowitzの方程式に基いた計算コスト(computationally expensive)のかかるオンザフライの計算を省くことができるという付加的な技術上の利益を与える。従って、装置の技術的な性能は大幅に向上する。   This reduction of over 99.9% in table overhead is clearly far superior to the previous optimized data compression method that only reduces data overhead by as much as 80% and is a large and cumbersome data table in the device Without the need to include the additional technical benefit of eliminating computationally expensive on-the-fly calculations based on the Reingold and Dershowitz equations. Therefore, the technical performance of the device is greatly improved.

本発明の背景にある主な考え方は、中国暦に関して何が確かであり、何が不確実であるかを理解することにある。或いは、別の言い方をすると、答えるべき質問は、出発点が特定のユリウス日に対応する固定された中国暦の日付である場合に、それぞれの次の日に対し、その日に対応する中国暦の日付は何日か、どの時点で計算結果が不確かとなるか、順番が確実に続くにはどの情報が必要であるか、を計算するよう試みることである。 The main idea behind the present invention is to understand what is certain about the Chinese calendar and what is uncertain. Or, in other words, if the starting point is a fixed Chinese calendar date corresponding to a specific Julian date, then for each subsequent day, the Chinese calendar corresponding to that date The date is an attempt to calculate how many days, at what point the calculation results are uncertain, and what information is needed to ensure that the order continues.

その順番が任意の周知のユリウス日及びそれに対応する中国暦の日付(すなわち、その日付に対する上述した5つの独立したデータ要素は周知である)から始まるとすれば、その中国暦の日付を含む中国暦の月の終わりが初めて近づくときに、最初の問題に直面することが分かる。 Date Chinese calendar that order correspond to any known Julian day and it (i.e., five independent data elements described above relative to that date are well known) if starting from China that contains the date of the Chinese calendar You can see that the first problem is encountered when the end of the calendar month approaches for the first time.

この点で、2つの情報が必要である。第1に、1ヶ月に何日あるかであり(29日又は30日の何れかでなければならない)、第2に、翌月がうるう月であるか否かである(いずれにしても)。この情報がいったん利用可能になれば、進行は維持され、現在の月がいつ終わるかが分かり、翌月の日数も分かる。   In this regard, two pieces of information are necessary. First, how many days are there in a month (must be either 29th or 30th), and second, whether the next month is a leap month (in any case). Once this information is available, progress is maintained, you know when the current month ends, and you know the number of days in the next month.

これは、中国暦の年の終わりにも当てはまることは注目に値する。任意の12の月の終わりに到達すると、その翌月がうるう月でなければ、中国暦の新年に至る。従って、翌月(新しい月)は1にリセットされ、うるう月の指標(indicator)はリセットされ、年が増加され、最後に、その年が60(周期の継続期間)を超えたかどうかを判断する判定がなされ、超えた場合には、周期が増加され、年は1にリセットされる。図1は、その範囲に含まれる中国暦の各年の月の長さ、そして、もしあれば、その範囲に含まれる中国暦の各年のどの月がうるう月であるかを示す図である。この情報は、テーブルとして計算機内に記憶される。 It is worth noting that this also applies to the end of the Chinese calendar year. When the end of any 12 months is reached, if the next month is not a leap month, a Chinese New Year is reached. Thus, the next month (new month) is reset to 1, the leap month indicator is reset, the year is incremented, and finally a decision to determine whether the year has exceeded 60 (the duration of the cycle) If exceeded, the period is increased and the year is reset to 1. FIG. 1 is a diagram showing the length of each month in the Chinese calendar included in the range and, if any, which month of each year in the Chinese calendar included in the range is a leap month. . This information is stored in the computer as a table.

計算機上に効率的なテーブルの形式で、この情報をエンコードする多数の可能な方法がある。しかしながら、本実施形態で開示された好適な実施は、Symbian Software Ltd.によって作成された携帯電話用のSymbian OS(登録商標)基本ソフトに対して設計されている。本発明を実施するためのサンプルコードの一例は、以下に示される。Symbian OS(登録商標)基本ソフトをプログラミングする当業者であれば、これから示す本発明の記載と併せて、その目的と意図を容易に理解できるであろう。   There are many possible ways to encode this information in the form of an efficient table on a computer. However, the preferred implementation disclosed in this embodiment is designed for Symbian OS (registered trademark) basic software for mobile phones created by Symbian Software Ltd. An example of sample code for implementing the present invention is shown below. Those skilled in the art of programming Symbian OS (registered trademark) basic software will be able to easily understand the purpose and intention of the present invention together with the description of the present invention.

しかしながら、以下に示す実施とその例は、例示的なものとして提供されたに過ぎないものと理解されるべきである。本発明は、Symbian OS(登録商標)基本ソフト又は以下に記載された特定の実施のみに限定されることを意図したものではない、という点を強調しておく。本発明は、その発明の範囲を逸脱しない限り、他のタイプの計算機を含む多くの異なるオペレーティングシステム及び装置で、様々な方法により実行されうる。   However, it is to be understood that the implementations and examples provided below are provided as examples only. It is emphasized that the present invention is not intended to be limited only to Symbian OS® basic software or the specific implementations described below. The present invention may be implemented in a variety of ways on many different operating systems and devices, including other types of computers, without departing from the scope of the invention.

以下に示す本発明の実施形態は、その年のどの月が29日間あり、どの月が30日間あるかという情報を、各年に対して、単純なビットマップ16ビット整数(bit-mapped 16-bit integer)で、エンコードするものである。通常の年の12ヶ月であるか、うるう年の13ヶ月であるか(1太陽年あたり1うるう月だけが可能である)の何れかがあることに注意されたい。本実施形態は、グレゴリオ暦の年における計算機の範囲を特定するものであり、上述のリソースを大量に消費する従来技術の解決策に容易に関連するため、1980年〜2100年に対する実施を示す。サンプルコードは、TCalconData::iCalConDataMonthと呼ばれるCALCONDATA.CPPファイル内のこれらの整数の配列を示す。この配列から、検討中である日付範囲における120年の各年に対し、それぞれ16ビットの整数が存在することが分かる。グレゴリオ暦1980年の開始は、この120年の期間における中国暦の最初の周期の55年の間に位置する。これは、配列内の最初の整数に付けられた0−55のコメントを説明し、進行が容易に理解できるようにしている。グレゴリオ暦1980年の開始は、中国暦55年の最後であり、中国暦55年は、グレゴリオ暦1980年の開始直後から始まる年ではない。中国暦の新年は、常に1月(January)か2月(February)であるため、グレゴリオ暦1980年の開始は、中国暦55年の最後の月又は最後から2番目の月の何れかとなる。また、中国暦55年がうるう年であるか否か、現在の月がうるう月であるか否か、そして、その年の残りの月が29日間又は30日間あるか否かを知る必要がある。従って、グレゴリオ暦1980年に付けれた情報は、グレゴリオ暦1979年に始まった中国暦の年も参照する必要がある。 The embodiment of the present invention described below provides information on which month of the year has 29 days and which month has 30 days, for each year a simple bitmap 16-bit integer (bit-mapped 16- bit integer). Note that there are either 12 months in a normal year or 13 months in a leap year (only one leap month per solar year is possible). This embodiment identifies the range of computers in the year of the Gregorian calendar and shows implementation for 1980-2100 as it is easily related to the above-described prior art solution that consumes a lot of resources. The sample code shows an array of these integers in the CALCONDATA.CPP file called TCalconData :: iCalConDataMonth. From this arrangement, it can be seen that there is a 16-bit integer for each of the 120 years in the date range under consideration. The beginning of the Gregorian calendar 1980 is located during 55 years of the first period of the Chinese calendar in this 120-year period. This explains the 0-55 comment attached to the first integer in the array, making the progress easy to understand. The beginning of the Gregorian calendar 1980 is the last of the 55th year of the Chinese calendar, and the 55th year of the Chinese calendar is not the year that begins immediately after the start of the 1980 Gregorian calendar. Since the Chinese New Year is always January or February, the start of the Gregorian calendar 1980 is either the last month of the Chinese calendar 55 or the penultimate month. It is also necessary to know whether the Chinese calendar year 55 is a leap year, whether the current month is a leap month, and whether there are 29 or 30 days remaining in the year. Therefore, the information attached to the Gregorian calendar 1980 must also refer to the year of the Chinese calendar that began in 1979 of the Gregorian calendar.

TCalconData::iCalConDataMonthにおける1番目の整数は、38608であり(16ビットバイナリ配列1001011011010000に対応する)、これは中国暦55年の情報を保有する。本発明のこの例では、この数列(sequence)におけるバイナリ「1」ビットは、30日間の月を示し、バイナリ「0」ビットは、29日間の月を示す。従って、このバイナリ配列、従って整数は、中国暦55年の始めは30日間あるので、1番目、4番目、6番目、7番目、9番目、10番目及び12番目が新しい月であり、この年の残りの月は29日間あることを示している。TCalconData::iCalConDataMonthにおける2番目の整数は、38320であり、これは、グレゴリオ暦1980年が始まる中国暦56年の情報を保有し、この整数は、バイナリ配列1001010110110000に対応する。従って、この整数は、中国暦56年の始めから、1番目、4番目、6番目、8番目、9番目、11番目及び12番目の月が30日間あり、この年の残りの月が29日間あることを示している。 The first integer in TCalconData :: iCalConDataMonth is 38608 (corresponding to the 16-bit binary array 1001011011010000), which holds information for the Chinese calendar 55 years. In this example of the invention, the binary “1” bit in this sequence indicates a 30-day month and the binary “0” bit indicates a 29-day month. Thus, this binary array, and therefore the integer, has 30 days at the beginning of the 55th year of the Chinese calendar , so the first, fourth, sixth, seventh, ninth, tenth and twelfth are the new months, and this year Indicates that there are 29 days in the remaining month. The second integer in TCalconData :: iCalConDataMonth is 38320, which holds information for the Chinese calendar year 56, starting with the Gregorian calendar 1980, and this integer corresponds to the binary array 1001010110110000. Therefore, this integer has 30 days for the first, fourth, sixth, eighth, ninth, eleventh and twelfth months from the beginning of the Chinese calendar year 56, and the remaining months of this year are 29 days. It shows that there is.

CALCONDATA.CPPファイルにおける2番目の配列は、TCalconData::iCalConDataYearと呼ばれ、32ビットの整数の配列からなる。一方、各年にはそれぞれ整数が存在し、配列内に示したコメントは、これらが前の配列に対するデータと適合することを明確にしている。各整数は、それぞれの年のより詳細な情報を提供する。各整数はまた、それぞれの年がいつ始まり、その年にうるう月があるか否か、もしあれば、どの月にあるかを知らせる。   The second array in the CALCONDATA.CPP file is called TCalconData :: iCalConDataYear and consists of an array of 32-bit integers. On the other hand, there is an integer for each year, and the comments shown in the array make it clear that they match the data for the previous array. Each integer provides more detailed information for each year. Each integer also tells when each year begins, whether there is a leap month in that year, and if so, in which month.

この配列における第1の整数は、1881492094であり、現在のグレゴリオ暦1980年の始めである中国暦55年に対する情報を与える。この32ビット整数の最下位ビット28は、中国暦55年の始めに対応するユリウス日を保持する。 The first integer in this array is 1881492094 and gives information for the Chinese calendar 55, the beginning of the current Gregorian calendar 1980. The least significant bit 28 of this 32-bit integer holds the Julian date corresponding to the beginning of the Chinese calendar year 55.

1881492094は、バイナリ配列01110000001001010100101001111110に対応し、バイナリ数字000001001010100101001111110がこの情報を提供する。これらの最下位ビット27は、ユリウス日2443902に対応している。ユリウス日からグレゴリオ暦の日付への変換は、非常に簡単であり、計算コストがかからない。そのような変換は、ユリウス日2443902が中国暦55年の新年の日付であるグレゴリオ暦1979年1月28日に対応することを示している。 1881492094 corresponds to the binary array 01110000001001010100101001111110, and the binary number 000001001010100101001111110 provides this information. These least significant bits 27 correspond to the Julian date 2443902. Converting from a Julian date to a Gregorian date is very simple and does not involve computational costs. Such a conversion indicates that the Julian day 2443902 corresponds to the Gregorian calendar January 28, 1979, which is the New Year date of the Chinese calendar 55.

1881492094に対応する32ビット整数の最上位の4ビットは0111であり、7に対応する。この情報は、このエンコードが1979年1月28日に始まる中国暦の新年のどの月(もしあれば)がうるう月であるかを示している。中国暦の年には、そもそもうるう月が1つしかない。従って、この場合、中国暦55年はうるう年であり、その年の7番目の月はうるう月であることが分かる。これは、その年の7番目の月は、実際にはうるう月6であり、うるう月ではない7の月は、実際にはその年の8番目の月になることに注意されたい。配列における2番目の整数は、2444286であり、これはバイナリ数列00000000001001010100101111111110に対応している。この数列では、最上位4ビットは0000であり、これはゼロに対応する。これは、中国暦56年がうるう月を含まず、従って、うるう年でないことを意味する。最下位ビット28は、1980年2月29日に対応するユリウス日2444286、従って、中国暦56年の新年であったことを意味する。 The most significant 4 bits of the 32-bit integer corresponding to 1881492094 is 0111, which corresponds to 7. This information indicates which month (if any) of the Chinese New Year starting on January 28, 1979 is a leap month. In the first year of the Chinese calendar , there is only one leap month. Therefore, in this case, it is understood that the Chinese calendar year 55 is a leap year, and the seventh month of the year is a leap month. Note that the seventh month of the year is actually leap month 6, and the non-leap month 7 is actually the eighth month of the year. The second integer in the array is 2444286, which corresponds to the binary number sequence 00000000001001010100101111111110. In this sequence, the most significant 4 bits are 0000, which corresponds to zero. This means that the Chinese calendar year 56 does not include a leap month and is therefore not a leap year. The least significant bit 28 means that it was a Julian day 2444286 corresponding to February 29, 1980, and thus the New Year of the Chinese calendar 56 years.

CALCONDATA.Hファイルは、問題となっている期間に対する中国暦データを解釈するために必要な全ての他のデータを提供し、関係したデータ範囲の境界を与え(ユリウス日2444240である1980年1月1日から、ユリウス日2488434である2100年12月31日まで)、また、考慮中である120年の期間の最初の中国暦の新年が中国暦56年であり、この120年の期間の最後の中国暦の新年が中国暦57年であり、この120年の期間が周期79で始まり、データが全体で中国暦の122年の範囲にわたることを伝える。 The CALCONDATA.H file provides all the other data necessary to interpret the Chinese calendar data for the period in question and gives the boundaries of the data range involved (Julius date 2444240, January 1980) 1st to Jul. 31st, 2100, which is Julius date 2488434), and the first Chinese New Year in the 120-year period under consideration is 56-year Chinese , and the end of this 120-year period. The Chinese New Year is the 57th year of the Chinese calendar , and this 120-year period begins at period 79, reporting that the data spans the entire 122-year range of the Chinese calendar .

CALCONDATA.CPP及びCALCONDATA.Hに与えられたデータは、予め作成され、携帯型計算機のリードオンリーメモリ(ROM)を構築するために使用されうる。これらのデータがどのように作成されるかは、本発明には重要ではない。これらは、ReingoldとDershowitzの方程式から計算されうる。また、南京の紫金山天文台又は他の公表された暦からのデータでも十分であろう。   Data provided to CALCONDATA.CPP and CALCONDATA.H can be created in advance and used to build a read-only memory (ROM) of a portable computer. How these data are created is not critical to the present invention. These can be calculated from the Reingold and Dershowitz equations. Data from the Nanjing Purple Gold Mine Observatory or other published calendars will also suffice.

上述の開示は、その動作を提供する背後のデータや理論の構成に関して、計算機用のPIMタイプのアプリケーションにおいて、これらのファイルが如何にして有効に使用されうるを十分に説明していると考えられる。従って、当業者であれば、ReingoldとDershowitzの方程式に代わって、技術的に優れたものを提供するために、本発明を容易に実施することができ、それによって、計算機リソース及び変換時間の点において、ユリウス日と中国暦の日付との間で、高速かつ高性能な変換を行うことができる。 The above disclosure is considered to fully explain how these files can be used effectively in PIM-type applications for computers, with regard to the underlying data and theoretical organization that provides that behavior. . Thus, one skilled in the art can easily implement the present invention to provide a technical alternative to the Reingold and Dershowitz equations, thereby reducing computer resources and conversion time. Can perform high-speed and high-performance conversion between Julian dates and Chinese calendar dates.

テーブルで表される日付の範囲の任意の中国暦の日付に対し、正確な中国暦の年に対するファイルテーブルの入力に直接移ることができ、全ての月の日の長さと任意の該当するうるう月のデータとともに、中国暦の年に対する新年のユリウス日を直接確かめることができる。従って、任意の中国暦の日付に対応した、ユリウス日、従ってグレゴリオ暦の日付を決定するためには、計算機で簡単かつ高速に実行可能な比較的小さい数の比較的簡単な四則演算を必要とする。 For any Chinese calendar date in the range of dates represented in the table, you can go directly to file table entry for the exact Chinese year , the length of all month days and any applicable leap month With the above data, you can directly check the Julian Day of the New Year for the Chinese calendar year. Therefore, to determine the Julian date and therefore the Gregorian date corresponding to any Chinese calendar date, a relatively small number of relatively simple four arithmetic operations that can be easily and quickly performed by a computer are required. To do.

その日付の範囲の任意のユリウス日に対し、そのユリウス日の直前の中国暦の新年を含むテーブルの入力に直接移ることができ、月の長さと任意の該当するうるう月の情報が一旦調べられると、正確な中国暦の日付を求めることも、特別の困難がなく、素早く実施することができる比較的簡単な四則演算である。 For any Julian date in that date range, you can go directly to the table entry containing the Chinese New Year just before the Julian date, and the length of the month and any relevant leap month information will be looked up once Finding an accurate Chinese calendar date is also a relatively simple four arithmetic operation that can be performed quickly without any special difficulties.

また、完全のために、下記に示す本発明の例も、サンプルプログラムファイルの一部を提供する。CHINESEUSINGTABLE.CPPは、どのように使用することができるかを示すためのサンプルとして提供されたテーブル内のデータを扱う手順を含んだ、Symbian OS(登録商標)基本ソフト用に書かれた作業プログラムから取得したコードの一部を含む。   Also, for completeness, the example of the invention shown below also provides a portion of a sample program file. CHINESEUSINGTABLE.CPP is a work program written for Symbian OS (registered trademark) basic software, including procedures for handling data in tables provided as samples to show how they can be used. Part of the acquired code is included.

当業者であれば、他の実施や更なる最適化が可能であることに容易に気づくであろう。特に、中国暦の新年ごとにユリウス日を一致させるという条件は、必ずしも必要ではなく、実際は、中国暦の日付とユリウス日が知られている1つの同日の日付だけで与えられる月の長さ及びうるう月データから算術的にこれらを求めることができる。 One skilled in the art will readily recognize that other implementations and further optimizations are possible. In particular, the condition of matching the Julian date for each New Year in the Chinese calendar is not necessarily required, in fact, the length of the month given only by the date of the Chinese calendar and the date of the same day on which the Julian date is known and These can be calculated arithmetically from leap month data.

更なる配列の圧縮と共に、この任意の最適化によって、日付の範囲内の各々の付加的な中国暦の年に対するオーバーヘッドが、上述の実施形態で用いられているように、1年当たり6バイト(又は48ビット)から、最低でも1年当たり17ビットまで減少されることができ、メモリの観点から更なるリソースの節約が可能となる。しかしながら、このタイプのビット配列を解凍するときに、何らかの付加的な計算コストがかかり、このタイプの実施はまた、与えられた同日の時点から離れた日付での演算をもたらし、同日の時点により近い日付でその演算を完了するのに時間がかかることになるだろう。 This optional optimization, along with further array compression, allows the overhead for each additional Chinese year within the date range to be 6 bytes per year (as used in the above embodiment). Or 48 bits) to at least 17 bits per year, allowing further resource savings from a memory perspective. However, there is some additional computational cost when decompressing this type of bit array, and this type of implementation also results in operations that are dated away from a given point in time and closer to that point in time It will take time to complete the operation by date.

毎年ほどは頻繁に現れない、複数の同時時点を持つハイブリッドも、明らかに可能である。本発明によって製造された、任意の装置に対するトレードオフの選択は、設計者に委ねられてもよいが、添付の特許請求の範囲に定められた本発明は、全てのこのような実施に適用されることを意図しており、上述の好適な実施の形態のみに限定されない。以下の例は、グレゴリオ暦1980年〜2100年までのメイン参照テーブルを提供する。このテーブルは、任意のうるう月と中国暦の新年のユリウス日とを表した、ビットマップ配列がその後に続く月の長さを示すビットマップ配列を含む。

Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
以下のテーブルは、グレゴリオ暦1980年〜2100年に対する付加的なカレンダー情報を示している。
Figure 2008537189
これらは、一連の有用なカレンダー分類を作り上げるためにテーブルがどのように使用されるかを示すコードの断片である。
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
図2は、ユリウス日の番号と中国暦の日付との間で変換を行うために用いられる処理をまとめたフローチャートを示す図である。 A hybrid with multiple simultaneous time points that does not appear as often as every year is clearly possible. The choice of trade-off for any device produced by the present invention may be left to the designer, but the present invention as defined in the appended claims applies to all such implementations. And is not limited to the preferred embodiments described above. The following example provides a main lookup table for the Gregorian calendar 1980-2100. This table includes a bitmap array representing the length of the month followed by a bitmap array, representing any leap month and Julian day of the Chinese New Year.
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
The following table shows additional calendar information for the Gregorian calendar 1980-2100.
Figure 2008537189
These are code snippets that show how tables are used to create a series of useful calendar categories.
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
Figure 2008537189
FIG. 2 is a flowchart summarizing the processing used to convert between the Julian day number and the Chinese calendar date.

本発明は、中国暦の機能を提供する現在の処理よりも、大きな技術上の利益を提供するということが、上述の説明と特定の例から分かるであろう。本発明は、以下のものを含む。・特定の年の番号の全体にわたって、制約されたリソースを備える計算機上であっても、高速に動作する、十分な中国暦の機能を利用する方法
・メモリやCPU使用などの計算リソースの高効率な使用
・コストがかかり、非常に長い浮動小数点番号演算は含まない
・縮小されたメモリ使用:同程度の現在のテーブルルックアップ方法の0.01%未満
・十分なPIM機能を備える計算機が、中国暦が広範囲に使用される国で働く人に、更に容易
に供給される
・実施される装置の電力が、大幅に低下し、これによって自然資源の点で環境上の利点があり、これを実施する装置のバッテリーの寿命が更に長くなる
本発明は、特定の実施形態を参照して説明しているが、添付の特許請求の範囲により定められた本発明の範囲を逸脱しない限り、修正がなされうることが分かるであろう。
It will be appreciated from the above description and specific examples that the present invention provides significant technical benefits over current processes that provide Chinese calendar functionality. The present invention includes the following.・ A method that uses sufficient functions of the Chinese calendar that operates at high speed even on a computer with restricted resources over a specific year number ・ High efficiency of calculation resources such as memory and CPU usage Costly and does not include very long floating point number operations Reduced memory usage: less than 0.01% of comparable current table lookup methods Computers with sufficient PIM capabilities are in China For those working in countries where the calendar is widely used, the power of the equipment that is more easily supplied and implemented is significantly reduced, which has an environmental advantage in terms of natural resources and implements it Although the present invention has been described with reference to particular embodiments, modifications may be made without departing from the scope of the invention as defined by the appended claims. You will see that it can be done.

任意の中国暦の年に発生する29日間の月と30日間の月とを決定する処理を 示す図である。It is a figure which shows the process which determines the month of 29 days and the month of 30 days which generate | occur | produce in arbitrary Chinese calendar years. 本発明に係るユリウス日の番号と中国暦の日付との間の変換処理を示す図であ る。It is a figure which shows the conversion process between the Julian day number and Chinese calendar date concerning this invention.

JP2007547644A 2004-12-22 2005-12-21 Calculator and method for converting between Julian dates and Lunar dates Pending JP2008537189A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
GBGB0428117.6A GB0428117D0 (en) 2004-12-22 2004-12-22 A computing device and method for converting between Julian calendar days and Chinese calendar dates
PCT/GB2005/004993 WO2006067452A1 (en) 2004-12-22 2005-12-21 A computing device and method for converting between julian calendar days and chinese calendar dates

Publications (2)

Publication Number Publication Date
JP2008537189A JP2008537189A (en) 2008-09-11
JP2008537189A5 true JP2008537189A5 (en) 2009-10-15

Family

ID=34113075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007547644A Pending JP2008537189A (en) 2004-12-22 2005-12-21 Calculator and method for converting between Julian dates and Lunar dates

Country Status (6)

Country Link
US (1) US20090063600A1 (en)
EP (1) EP1831794A1 (en)
JP (1) JP2008537189A (en)
CN (1) CN101111831A (en)
GB (2) GB0428117D0 (en)
WO (1) WO2006067452A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123633A (en) * 2014-07-24 2014-10-29 北京嘉和美康信息技术有限公司 Calendar control

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU6240398A (en) * 1997-01-14 1998-08-03 Benjamin Slotznick System for calculating occasion dates and converting between different calendar systems, and intelligent agent for using same
US7349920B1 (en) * 2004-02-13 2008-03-25 Microsoft Corporation Simultaneous display of multiple calendar systems
EP1677165B1 (en) * 2004-12-30 2011-11-02 Asulab S.A. Timepiece with a mechanical Chinese calendar
DE602005022742D1 (en) * 2005-12-23 2010-09-16 Swatch Group Res & Dev Ltd Mechanism for displaying values in variable cycles, especially in a lunar and solar calendar

Similar Documents

Publication Publication Date Title
CN110879724A (en) FP16-S7E8 hybrid accuracy for deep learning and other algorithms
CN105453071A (en) Methods, apparatus, instructions and logic to provide vector population count functionality
US8572110B2 (en) Textual search for numerical properties
CN105247474B (en) The device and method with permutated bits are inverted in mask register
TW201640331A (en) Method and apparatus for vector index load and store
Al-Khaleel et al. Fast and compact binary-to-BCD conversion circuits for decimal multiplication
CN103294650A (en) Method and device for displaying electronic document
CN111460815B (en) Rule processing method, apparatus, medium, and electronic device
US20070245235A1 (en) Efficient storage of drawing objects in synchronizable electronic documents
CN105677348A (en) BOOT program storing method and device and BOOT program starting method and device
KR100310717B1 (en) Method and apparatus for storing data to and retrieving data from handheld device
US10467324B2 (en) Data packing techniques for hard-wired multiplier circuits
JP2008537189A5 (en)
CN110007963A (en) Vector multiplication and cumulative device and method for no symbol double word
JP2008537189A (en) Calculator and method for converting between Julian dates and Lunar dates
CN115827555B (en) Data processing method, computer device, storage medium, and multiplier structure
US20160299656A1 (en) System and method for saving an open file
CN115759954A (en) Method, system, device and medium for driving business object progress based on life cycle
CN105068850A (en) Resource bundle loading device, method and computing device
CN104823153A (en) Leading change anticipator logic
CN104049940A (en) Systems, Apparatuses, And Methods For Reducing The Number Of Short Integer Multiplications
EP1700208B1 (en) Apparatus and method to avoid floating point control instructions in floating point to integer conversion
WO2019119336A1 (en) Multi-thread compression and decompression methods in generic data gz format, and device
CN101963892A (en) Method and device for printing table data
CN110489034B (en) Internet-based travel route interaction method, electronic device and medium