Menu
Forums
New posts
Search forums
What's new
New posts
Latest activity
Log in
Register
What's new
Search
Search
Search titles and first posts only
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Help Support The Rugby Forum :
Forums
Other Stuff
Rugby Video Games & Apps
Your Help Needed! - tornament creating
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="kingwilko" data-source="post: 85518"><p>Here is how the date bytes work. It sounds complex but it works...</p><p></p><p>Byte 9 = A and Byte 10 = B</p><p></p><p>Day: Int(A/128) + (16ModB)*2</p><p>Month: 1 + (Int((128ModA)/16))*4 + Int((16ModA)/4)</p><p></p><p>Example 1:</p><p></p><p>005 197</p><p></p><p>Day: Int(5/128) + (16Mod197)*2 = 10</p><p>Month: 1 + (Int((128Mod5)/16))*4 + Int((16Mod5)/4) = 2</p><p>Therefore: 10 February</p><p></p><p>Example 2:</p><p></p><p>013 206</p><p>Day: Int(13/128) + (16Mod206)*2 = 28</p><p>Month: 1 + (Int(128Mod13)/16))*4 + Int((16Mod13)/4) = 4</p><p>Therefore: 28 April</p><p></p><p>Example 3:</p><p></p><p>144 198</p><p>Day: Int(144/128) + (16Mod198)*2 = 13</p><p>Month: 1 + (Int(128Mod144)/16))*4 + Int((16Mod144)/4) = 5</p><p>Therefore: 13 May</p><p></p><p>(As a side note if we think of the hex characters that make up the byte day can effectively be expressed as B2*2 + A1/8 and month as 1 + A1*4 + A2/4. However I think it is easier to code it in decimal)</p><p></p><p>If I want to make a fixture between England and Scotland at Twickenham on 3 October it would look something like this:</p><p></p><p>[code]11 05 00 00 00 00 00 00 A5 C1 FA 0E[/code]</p><p></p><p>Perhaps someone could enter that with their hex editor and check.</p></blockquote><p></p>
[QUOTE="kingwilko, post: 85518"] Here is how the date bytes work. It sounds complex but it works... Byte 9 = A and Byte 10 = B Day: Int(A/128) + (16ModB)*2 Month: 1 + (Int((128ModA)/16))*4 + Int((16ModA)/4) Example 1: 005 197 Day: Int(5/128) + (16Mod197)*2 = 10 Month: 1 + (Int((128Mod5)/16))*4 + Int((16Mod5)/4) = 2 Therefore: 10 February Example 2: 013 206 Day: Int(13/128) + (16Mod206)*2 = 28 Month: 1 + (Int(128Mod13)/16))*4 + Int((16Mod13)/4) = 4 Therefore: 28 April Example 3: 144 198 Day: Int(144/128) + (16Mod198)*2 = 13 Month: 1 + (Int(128Mod144)/16))*4 + Int((16Mod144)/4) = 5 Therefore: 13 May (As a side note if we think of the hex characters that make up the byte day can effectively be expressed as B2*2 + A1/8 and month as 1 + A1*4 + A2/4. However I think it is easier to code it in decimal) If I want to make a fixture between England and Scotland at Twickenham on 3 October it would look something like this: [code]11 05 00 00 00 00 00 00 A5 C1 FA 0E[/code] Perhaps someone could enter that with their hex editor and check. [/QUOTE]
Verification
Post reply
Forums
Other Stuff
Rugby Video Games & Apps
Your Help Needed! - tornament creating
Top