Data conversions solving time limitations of object-oriented software programs
AssigneeInternational Business Machines Corporation
InventorAlan Tsu-I Yaung
Life of this patent
Estimating the term…
Abstract
A method, apparatus, and article of manufacture for converting dates in object-oriented software programs utilizing time classes covering limited periods of time is provided. A conversion object identifies a target year in which an application program should execute. If the target year falls outside of the limited period of time, the conversion object converts the target year into a base year which falls within the limited time period and a corresponding offset. The application program is then executed with the target year, and if the target year is needed by the application program, it can be reconstructed by adding the base year and corresponding offset.
Claims6
A method of converting date data in a computer system, the method comprising the steps of:
- providing a conversion class that encapsulates a time class, wherein the time class covers a limited time period;
- generating a conversion object from the conversion class;
- when the conversion object is invoked,
- identifying a target date;
- determining whether the target date falls outside of the limited time period;
- and
- when the target date falls outside of the limited time period, converting the target date to one that falls within the limited time period,
- wherein the target date comprises a target year and converting the target date comprises:
- determining a base year;
- and
- calculating a resulting offset as a difference between the target year and the base year;
- and
- wherein the base year is assigned a value of 1970 if the target year is less than 1970.
A method of converting date data in a computer system, the method comprising the steps of:
- providing a conversion class that encapsulates a time class, wherein the time class covers a limited time period;
- generating a conversion object from the conversion class;
- when the conversion object is invoked,
- identifying a target date;
- determining whether the target date falls outside of the limited time period;
- and
- when the target date falls outside of the limited time period, converting the target date to one that falls within the limited time period,
- wherein the target date comprises a target year and converting the target date comprises:
- determining a base year;
- and
- calculating a resulting offset as a difference between the target year and the base year;
- and
- wherein the base year is assigned a value of 2037 if the target year is greater than 2037.
An apparatus for converting date data in a computer system, comprising:
- a computer having a clock and a data storage device storing data files connected thereto;
- and
- one or more programs, performed by the computer, for providing a conversion class that encapsulates a time class wherein the time class covers a limited time period;
- for generating a conversion object from the conversion class;
- and for, when the conversion object is invoked, identifying the target date, determining whether the target date is outside of the limited time period, and, when the target date falls outside of the limited time period, converting the target date to one that falls within the limited time period,
- wherein the target date comprises a target year and converting the target date comprises:
- determining a base year;
- and
- calculating a resulting offset as a difference between the base year and the target year, and
- wherein the base year is assigned a value of 1970 if the target year is less than 1970.
An apparatus for converting date data in a computer system, comprising:
- a computer having a clock and a data storage device storing data files connected thereto;
- and
- one or more programs, performed by the computer, for providing a conversion class that encapsulates a time class wherein the time class covers a limited time period;
- for generating a conversion object from the conversion class;
- and for, when the conversion object is invoked, identifying the target date, determining whether the target date is outside of the limited time period, and, when the target date falls outside of the limited time period, converting the target date to one that falls within the limited time period,
- wherein the target date comprises a target year and converting the target date comprises:
- determining a base year;
- and
- calculating a resulting offset as a difference between the base year and the target year, and
- wherein the base year is assigned a value of 2037 if the target year is greater than 2037.
An article of manufacture comprising a computer program carrier readable by a computer having a clock, a data file, and an application program and embodying one or more instructions executable by the computer to perform method steps for converting date data in the computer, the method comprising the steps of:
- providing a conversion class that encapsulates a time class, wherein the time class covers a limited time period;
- generating a conversion object from the conversion class;
- when the conversion object is invoked,
- identifying a target date;
- determining whether the target date falls outside of the limited time period;
- and
- when the target date falls outside of the limited time period, converting the target date to one that falls within the limited time period,
- wherein the target date comprises a target year and converting the target year comprises:
- determining a base year;
- and
- calculating a resulting offset as a difference between the target year and the base year;
- and
- wherein the base year is assigned a value of 1970 if the target year is less than 1970.
An article of manufacture comprising a computer program carrier readable by a computer having a clock, a data file, and an application program and embodying one or more instructions executable by the computer to perform method steps for converting date data in the computer, the method comprising the steps of:
- providing a conversion class that encapsulates a time class, wherein the time class covers a limited time period;
- generating a conversion object from the conversion class;
- when the conversion object is invoked,
- identifying a target date;
- determining whether the target date falls outside of the limited time period;
- and
- when the target date falls outside of the limited time period, converting the target date to one that falls within the limited time period,
- wherein the target date comprises a target year and converting the target year comprises:
- determining a base year;
- and
- calculating a resulting offset as a difference between the target year and the base year;
- and
- wherein the base year is assigned a value of 2037 if the target year is greater than 2037.
Dependencies are inferred from the claim text.