Date calculations on the 35s



#7

Hi, just wondering if someone has written a little program to do date calculations on the 35s that they would be willing to share.

Thanks!

Peter


#8

Here is a very nice algorithm that is easy to implement as an RPN program.

#9

Peter,

I don't have the HP-35s anymore, but I think the following should work on it with little or no change.

Regards,

Gerson.


DATE & DAYS BETWEEN DATES ROUTINES (HP-33S VERSION)

G0001 LBL G
G0002 x<>y
G0003 STO A
G0004 x<>y
G0005 ENTER
G0006 IP
G0007 STO C
G0008 Rv
G0009 RLC C
G0010 -
G0011 100
G0012 *
G0013 ENTER
G0014 IP
G0015 STO B
G0016 Rv
G0017 FP
G0018 4
G0019 10^x
G0020 *
G0021 STO D
G0022 2
G0023 ENTER
G0024 RCL C
G0025 x>y?
G0026 GTO H
G0027 RCL D
G0028 1
G0029 -
G0030 100
G0031 /
G0032 1
G0033 +
G0034 IP
G0035 0.75
G0036 *
G0037 IP
G0038 +/-
G0039 RCL D
G0040 1
G0041 -
G0042 4
G0043 /
G0044 IP
G0045 +
G0046 RCL C
G0047 1
G0048 -
G0049 31
G0050 *
G0051 +
G0052 RCL B
G0053 +
G0054 RCL D
G0055 365
G0056 *
G0057 +
G0058 RTN


H0001 LBL H
H0002 RCL D
H0003 365
H0004 *
H0005 RCL B
H0006 +
H0007 RCL C
H0008 1
H0009 -
H0010 31
H0011 *
H0012 +
H0013 RCL C
H0014 0.4
H0015 *
H0016 2.3
H0017 +
H0018 IP
H0019 -
H0020 RCL D
H0021 4
H0022 /
H0023 IP
H0024 +
H0025 RCL D
H0026 100
H0027 /
H0028 1
H0029 +
H0030 0.75
H0031 *
H0032 IP
H0033 -
H0034 RTN


N0001 LBL N
N0002 XEQ G
N0003 RCL A
N0004 XEQ G
N0005 RCL A
N0006 -
N0007 +/-
N0008 RTN


W0001 LBL W
W0002 XEQ G
W0003 ENTER
W0004 +/-
W0005 7
W0006 /
W0007 IP
W0008 7
W0009 *
W0010 +
W0011 RTN


Length & Checksum Table:


LBL CK LN
G 7A9E 318
H 75E1 210
N E3B8 24
W 3A2B 57


Usage:


date 1 (MM.DDYYYY)
ENTER
date 2 (MM.DDYYYY)
XEQ N => number of days between dates


date (MM.DDYYYY)
XEQ W => weekday (0=Sat, 1=Sun, ... , 6=Fri)

#10

I think I ported this from some place (old calculator program perhaps), but here is what I have. 

Days between dates:
1. Enter date in mm.ddyyyy format, XEQ X001
2. Store result in A
3. Enter second date, XEQ X001
4. Subtract A from the result

Find the date so many days after starting date:
1. Enter date, XEQ X001
2. Add the number of days to the result
3. XEQ X037

General:
X001 - mm.ddyyyy to Julian
X037 - Julian to mm.ddyyyy

Program:
X001 LBL X
X002 INTG
X003 STO M
X004 LASTx
X005 FP
X006 1E2
X007 x
X008 INTG
X009 STO D
X010 LASTx
X011 FP
X012 1E4
X013 x
X014 STO Y
X015 2
X016 RCL M
X017 x > y ?
X018 GTO X023
X019 1
X020 STO- Y
X021 12
X022 STO+ M
X023 1
X024 STO+ M
X025 RCL Y
X026 365.25
X027 x
X028 INTG
X029 30.6001
X030 RCLx M
X031 INTG
X032 +
X033 RCL+ D
X034 1720982
X035 +
X036 RTN

X037 ENTER
X038 68569
X039 +
X040 STO A
X041 4
X042 x
X043 146097
X044 /
X045 INTG
X046 STO B
X047 146097
X048 x
X049 3
X050 +
X051 4
X052 /
X053 INTG
X054 +/-
X055 RCL+ A
X056 STO A
X057 1
X058 +
X059 4000
X060 x
X061 1461001
X062 /
X063 IP
X064 STO Y
X065 1461
X066 x
X067 4
X068 /
X069 INTG
X070 +/-
X071 31
X072 +
X073 RCL+ A
X074 STO A
X075 80
X076 x
X077 2447
X078 /
X079 INTG
X080 STO M
X081 2447
X082 x
X083 80
X084 /
X085 INTG
X086 +/-
X087 RCL+ A
X088 STO D
X089 RCL M
X090 11
X091 /
X092 INTG
X093 STO A
X094 12
X095 x
X096 +/-
X097 2
X098 +
X099 RCL+ M
X100 STO M
X101 RCL B
X102 49
X103 -
X104 1E2
X105 x
X106 RCL+ Y
X107 RCL+ A
X108 STO Y
X109 FIX 6
X110 1E-6
X111 x
X112 +
X113 x<>y (SWAP)
X114 1E-2
X115 x
X116 +
X117 RTN



#11

wow, you guys are simply awesome, thank you so much, this is exactly what I was looking for. Thanks!!!

Peter

#12

Here is the International Version:

Days between dates:
1. Enter date in dd.mmyyyy format, XEQ X001
2. Store result in A
3. Enter second date, XEQ X001
4. Subtract A from the result


Find the date so many days after starting date:
1. Enter date, XEQ X001
2. Add the number of days to the result
3. XEQ X037


General:
X001 - dd.mmyyyy to Julian
X037 - Julian to dd.mmyyyy


Program:
X001 LBL X
X002 INTG
X003 STO D
X004 LASTx
X005 FP
X006 1E2
X007 x
X008 INTG
X009 STO M
X010 LASTx
X011 FP
X012 1E4
X013 x
X014 STO Y
X015 2
X016 RCL M
X017 x > y ?
X018 GTO X023
X019 1
X020 STO- Y
X021 12
X022 STO+ M
X023 1
X024 STO+ M
X025 RCL Y
X026 365.25
X027 x
X028 INTG
X029 30.6001
X030 RCLx M
X031 INTG
X032 +
X033 RCL+ D
X034 1720982
X035 +
X036 RTN


X037 ENTER
X038 68569
X039 +
X040 STO A
X041 4
X042 x
X043 146097
X044 /
X045 INTG
X046 STO B
X047 146097
X048 x
X049 3
X050 +
X051 4
X052 /
X053 INTG
X054 +/-
X055 RCL+ A
X056 STO A
X057 1
X058 +
X059 4000
X060 x
X061 1461001
X062 /
X063 IP
X064 STO Y
X065 1461
X066 x
X067 4
X068 /
X069 INTG
X070 +/-
X071 31
X072 +
X073 RCL+ A
X074 STO A
X075 80
X076 x
X077 2447
X078 /
X079 INTG
X080 STO M
X081 2447
X082 x
X083 80
X084 /
X085 INTG
X086 +/-
X087 RCL+ A
X088 STO D
X089 RCL M
X090 11
X091 /
X092 INTG
X093 STO A
X094 12
X095 x
X096 +/-
X097 2
X098 +
X099 RCL+ M
X100 STO M
X101 RCL B
X102 49
X103 -
X104 1E2
X105 x
X106 RCL+ Y
X107 RCL+ A
X108 STO Y
X109 FIX 6
X110 1E-6
X111 RCL M
X112 1E-2
X113 *
X114 +
X115 RCL+ D
X116 RTN



Possibly Related Threads...
Thread Author Replies Views Last Post
  Prime: how to detect date format giancarlo 1 714 12-02-2013, 11:21 AM
Last Post: Michael de Estrada
  Date/time formats R. Pienne 4 1,110 11-01-2013, 12:43 PM
Last Post: Marcus von Cube, Germany
  How to set the Date.Time etc on a WP34S Harold A Climer 4 1,040 10-29-2013, 09:32 PM
Last Post: FORTIN Pascal
  Date/time programs for the HP 35s R. Pienne 0 530 10-03-2013, 02:37 PM
Last Post: R. Pienne
  [wp34s] Alternative MIO (allows calculations when entering element values) David Maier 1 546 02-03-2013, 02:51 PM
Last Post: Marcus von Cube, Germany
  Date & Time disappear on WP 34S René Franquinet 16 2,473 12-10-2012, 08:24 AM
Last Post: Walter B
  A little OT: Blank date fields in 200LX database Dave Britten 1 653 07-12-2012, 06:11 PM
Last Post: Dave Britten
  Financial Calculations for the HP41: another enhanced version Luiz C. Vieira (Brazil) 0 403 04-16-2012, 09:16 AM
Last Post: Luiz C. Vieira (Brazil)
  [WP 34S] Complex calculations (poll) Walter B 41 4,021 04-08-2012, 01:44 AM
Last Post: Paul Dale
  HP SMB 15C LE ship date Scott Newell 9 1,163 12-17-2011, 11:25 PM
Last Post: Scott Newell

Forum Jump: