{"id":709,"date":"2008-01-16T21:04:48","date_gmt":"2008-01-16T19:04:48","guid":{"rendered":"http:\/\/www.all-things-me.net\/blog\/2008\/01\/16\/25"},"modified":"2014-01-28T19:32:41","modified_gmt":"2014-01-28T17:32:41","slug":"25","status":"publish","type":"post","link":"https:\/\/www.all-things-me.net\/blog\/2008\/01\/16\/25","title":{"rendered":"&#8220;25&#8221;"},"content":{"rendered":"<p>At work all the women seem to stop ageing at 25 so today I had my very first &#8220;25th&#8221; birthday. I bought some candy for people at work (we do that..).<\/p>\n<p>Not much special about today, though. I did get a nice water boiler for a present and some money from my grandparents. I&#8217;m either going to buy some kitchenware (pots and pans) or Duma Key by Stephen King (published on Jan 22!).<\/p>\n<p>I just <a href=\"http:\/\/www.pizero.net\/archives\/245#comment-1783\">took part<\/a> in <a href=\"http:\/\/www.pizero.net\/\">Pizero<\/a>&#8216;s theme contest. When I was reading the post I thought, &#8220;I&#8217;ll take part if I get to be number 42.&#8221; And what do you know, the last comment was number 41. Of course I have to try my luck!<\/p>\n<p>I remember thinking about something to write on my way to the train station this morning but now I can&#8217;t remember what it was.<\/p>\n<p><!--hide--><br \/>\n[Edit (30 seconds later&#8230;)] Now I remember! As I was updating the site to update my age in the sidebar and on the about page, I got to thinking &#8220;can&#8217;t this be done with PHP without having to go through this HUUUUGE task [ <img src=\"https:\/\/www.all-things-me.net\/blog\/wp-includes\/images\/smilies\/icon_wink.gif\" alt=\";)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> ] every year?&#8221; Well, yes it can! For example<\/p>\n<blockquote class=\"php\"><p>&lt;?php echo date(&#8216;Y&#8217;)-<em>year of birth<\/em>; ?&gt;<\/p><\/blockquote>\n<p>Now my site will remember how old I am even if I forget.<br \/>\n[Edit almost a year later] Now that I&#8217;m almost a year older (and the year has changed&#8230;) I&#8217;ve noticed that code bit is OF COURSE not enough. Now I created this little function.<\/p>\n<blockquote class=\"php\"><p>function myage() {<br \/>\n$myage = date(&#8216;Y&#8217;)-<em>year of birth<\/em>;<br \/>\n$mymonth = date(&#8216;n&#8217;);<br \/>\n$myday = date(&#8216;j&#8217;);<br \/>\nif ($mymonth &gt;= <em>month of birth<\/em> &amp;&amp; $myday &gt;= <em>day of birth<\/em>) {<br \/>\nreturn $myage;<br \/>\n} else {<br \/>\nreturn $myage-1;<br \/>\n}<br \/>\n}<\/p><\/blockquote>\n<p><!--\/hide--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At work all the women seem to stop ageing at 25 so today I had my very first &#8220;25th&#8221; birthday. I bought some candy for people at work (we do that..). Not much special about today, though. I did get a nice water boiler for a present and some money from my grandparents. I&#8217;m either [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-709","post","type-post","status-publish","format-standard","hentry","category-miscellany"],"_links":{"self":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/comments?post=709"}],"version-history":[{"count":3,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/709\/revisions"}],"predecessor-version":[{"id":2215,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/posts\/709\/revisions\/2215"}],"wp:attachment":[{"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/media?parent=709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/categories?post=709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.all-things-me.net\/blog\/wp-json\/wp\/v2\/tags?post=709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}