Flavigula.net - Martenblog

The Diffused Morning

21 Jul, 2000 08:32
music, freedom, programming

8.32

Kevin Gilbert and another sleepless morning.

Messages from Frank originating at Dasa's mobile keep me curiously occupied. Viking soon leaves for work. Poor soul. What are my plans for the day? A healthy shine radiates from the diffused morning, chilly but compelling. My feet smell. I don't care. Since I stopped my alcohol binging, I have awakened at 7.30am each day, unable to catch any more snoozums, insomniac, somehow able to face the blank page of a new day. But that is what I have always wanted -> this absurd freedom which fills this summer, so obscenely contrasting the previous summer during which I was chained, bound, watched like a naughty puppy.
So today will be occupied by the completion of 'Work Song' and mayhap even the beginning of work on Renata's piece. She needs to bite into something in 7/8. It would torment her already tortured soul. Poor girl. I keep getting ridiculous messages from Frank accusing me of not helping Dasa with her Java project. What a doof.

13.20

Well, I fixed the error where the thinghie displayed the previous month with a 'hack'. I say hack because I believe there is some bug in php. For example, this code:

if($vars["rok"] == $y) {
  $m = substr($f,4,2);
  if($m != $l_m) {
    echo "   <a href=\"muse.php?rok=$y\" . ($vars["mesic"] == $m ? "" : "&mesic=$m") . "\">" . date("M",mktime(0,0,0,$m + 1,0,0)) . "<br>";
  } ....

should display the NEXT month because of the fucking $m+1, but it displays the correct month, despite the documentation on the mktime function:

mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value for out-of-range input. For example, each of the following lines produces the string Jan-01-1998.

Example 1. mktime() example
echo date( \"M-d-Y\", mktime(0,0,0,12,32,1997) );
echo date( \"M-d-Y\", mktime(0,0,0,13,1,1997) );
echo date( \"M-d-Y\", mktime(0,0,0,1,1,1998) );

Bastards.