MathU™ RPN 2.2 for iPhone
Documentation
< [PREV CHAPTER] [HOME] [NEXT CHAPTER] >
Date and Time Functions
MathU RPN has four date and time functions
- H.MS Converts the x stack value from fractional hours to H.MS format. In H.MS format (HH.MMSS), the integer part of the value is the number of hours while the fractional part is broken into two fields: M, the minutes, and S, the seconds. Each field comprises two digits of the fraction. For example, the number 2.03165 is interpreted as 2 hours, 3 minutes, 16.5 seconds or 2°3'16.5" using standard degrees, minutes, seconds notation. Thus, the H.MS interpretation is also valid for D.MS as well. When using the H.MS and hours functions is usually helpful to set the number of digits displayed to be 4 or greater.
- HOUR Converts the x stack value from H.MS format to fractional hours. Digits after the fourth fractional digit are interpreted as fractions of a second.
- DATE determines a date x days in the future from the date y. A date in the past can be determined by specifying a negative x. The date is entered as a 8 digit number in the format M.DY (MM.DDYYYY) or D.MY (DD.MMYYYY) depending on the Date format preference setting. The result is displayed in a special format DD,MM,YYYY D where the digit D at the right indicates the day of the week (1=Monday, 7=Sunday).
- ΔDYS determines the number of days between date y and date x. The number of days is returned in the x register and the number of days based on a 360 day year is returned in the y register.
Example 1: What is the date 180 days into the future from Feb. 3, 1997?
- Setting Date format setting to M.DY in the preferences
- 2 . 0 3 1 9 9 7 to enter the beginning date (note that two digits must be used for the day).
- ENTER to separate the date from the number of days
- 1 8 0 the number of days into the future
- DATE computes the end date and the day of the week. Ans: 8.021997, DOW=6 (Aug. 2, 1997, a Saturday)
Example 2: How many leap days are there between Jan 1, 1900 and Jan 1, 2000?
- 1 . 0 1 1 9 0 0 enter the first date
- ENTER separate the two dates
- 1 . 0 1 2 0 0 0 enter the second date
- ΔDYS compute the number of days between the two dates. Ans: 36,524
- 3 6 5 0 0 enter the number of days in 100 non-leap years
- − to compute the additional days (leap days). Ans: 24

