All times are UTC [ DST ]




Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
  Offline
PostPosted: August 30th, 2016, 7:14 pm 
King

Joined: February 24th, 2016, 8:29 pm
Posts: 555
Greetings all. The old calendar had some errors. I have since fixed it.
This old code:
Code:
<?php
$day = date('d');
$mercannum = $day / 6;
$base_year = -2;
if ($mercannum >= 0 && $mercannum < 1) {
   $extra_year = $base_year;
} else if ($mercannum >= 1 && $mercannum < 2) {
   $extra_year = $base_year +1;
} else if ($mercannum >= 2 && $mercannum < 3) {
   $extra_year = $base_year +2;
} else  if ($mercannum >= 3 && $mercannum < 4) {
   $extra_year = $base_year +3;   
} else if ($mercannum >= 4 && $mercannum < 5) {
   $extra_year = $base_year +4; }

Should be changed to:
Code:
<?php
$day = date('d');  //today
$mercannum = $day / 6;
$base_year = -2; //for tweaking
if ($day >= 0 && $day < 1) { //saves extra years to be added into months below.
   $extra_year = $base_year; 
} else if ($day >= 6 && $day < 11) {
   $extra_year = $base_year +1;
} else if ($day >= 11 && $day < 16) {
   $extra_year = $base_year +2;
} else  if ($day >= 16 && $day < 21) {
   $extra_year = $base_year +3;    
} else if ($day >= 21 && $day < 26) {
   $extra_year = $base_year +4;    
} else if ($day >= 26) {
   $extra_year = $base_year +5; }


Top
 Profile  
Reply with quote  
  Offline
PostPosted: August 30th, 2016, 7:17 pm 
King

Joined: February 24th, 2016, 8:29 pm
Posts: 555
Also, I created a Calendar Converter! Huzah!

http://codydodd.ca/hermertia/cal.php

I put it behind a clickable button so we can add this to our own header. I will add source code as a message after, or we can work on uploading it together Siden? I'll be checking in and out all week for you during the mornings and afternoons. Hope it works out.


Top
 Profile  
Reply with quote  
  Offline
PostPosted: August 30th, 2016, 9:29 pm 
User avatar
King

Joined: May 30th, 2015, 1:05 am
Posts: 472
Location: Wisconsin, USA
Wow, that is really neat! Having the calendar (and now the converter) is going to make it so much easier to keep track of lore dates for everyone.

_________________
King Arjen V

King of Ertia


Top
 Profile  
Reply with quote  
  Offline
PostPosted: August 31st, 2016, 3:42 am 
User avatar
King

Joined: May 31st, 2015, 3:32 am
Posts: 843
So awesome!

_________________
Scrios V
King of Perth, Brother of Valyria


Top
 Profile  
Reply with quote  
  Offline
PostPosted: August 31st, 2016, 9:16 pm 
User avatar
King

Joined: May 30th, 2015, 10:17 am
Posts: 3792
Location: Stirling - Scotland
Most excellent work, Regent of Minerva! Your people have produced some fine work since returning to the fold of the Empire from obscurity.

_________________
Talja-Sameria Tourmaline II - Tip of the Spear
Queen of Dawnstar, Deputy Minister for Hermertian Culture.
Adjudicator for Valyrian Affairs, Forums Administrator

Gold Roads. Fractal Mining. Lore Compliance Ducks.


Top
 Profile  
Reply with quote  
  Offline
PostPosted: September 10th, 2016, 4:14 pm 
King

Joined: February 24th, 2016, 8:29 pm
Posts: 555
Bumping. Out of curiosity, has the new code been uploaded to fix the header? I can't tell.

The calendar converter is optional, but super cool and I suggest if we don't embed it directly into the header behind a small button, then at least we should permalink it.

But: question, if we are in a new cycle, we are at 00-00 instead of 01-03, right?


Top
 Profile  
Reply with quote  
  Offline
PostPosted: September 10th, 2016, 4:16 pm 
King

Joined: February 24th, 2016, 8:29 pm
Posts: 555
Or rather, 00-03? If so, let me make a quick revision


Top
 Profile  
Reply with quote  
  Offline
PostPosted: September 10th, 2016, 4:16 pm 
User avatar

Joined: April 28th, 2016, 6:15 pm
Posts: 2001
Location: California
It should be 00-03, correct.

_________________
Ealdorman Cerdic Beoden Accynnafon of Östlond
Runner Up of the Glas Claddach Boat Building Competition
Minister of Justice


Top
 Profile  
Reply with quote  
  Offline
PostPosted: September 10th, 2016, 4:32 pm 
User avatar
King

Joined: May 30th, 2015, 7:09 pm
Posts: 1086
I thought the cycle started this month, so shouldn't it be 00-00 or 00-01

_________________
By the will of Azarn
-Erastil
-King of Pyrencia
-The Hydra
For a full list of titles, please see enclosed document.
viewtopic.php?f=4&t=741


Top
 Profile  
Reply with quote  
  Offline
PostPosted: September 10th, 2016, 4:34 pm 
User avatar

Joined: April 28th, 2016, 6:15 pm
Posts: 2001
Location: California
No, as Gimpy made an excellent argument for when the website went down and info was lost: The Mercannum is tied to the IRL month. September is always 03.

_________________
Ealdorman Cerdic Beoden Accynnafon of Östlond
Runner Up of the Glas Claddach Boat Building Competition
Minister of Justice


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Imperium - Modified by Rey phpbbmodrey