<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Calendar Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/Tag/1285/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to Calendar.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 18 Jun 2013 22:29:06 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>getdate() always returning 0 for the day?</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/418872/418872/ReadMessage.aspx#418872</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Sephiroth/"&gt;Sephiroth&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/phpstuff/418872/418872/ReadMessage.aspx#418872"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/phpstuff/Board.aspx"&gt;PHP&lt;/a&gt; forum.&lt;/p&gt;Alright, I am trying to get the day of the week that the month started on so I can produce a PHP-based calendar for a site I am developing. For some reason however, "getdate()" is always forcing "wday" to zero. It's driving me insane because after hours of searching, I have come across several other calendars that use the exact same code that I use and they work. I don't get why this is happening, could somebody explain this, or is it another PHP anomaly?&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
$CurMonth = (date("n") - 1);
$CurYear = date("Y");
$Timestamp = mktime(0, 0, 0, $CurMonth, 1, $CurYear);
$MaxDay = date("t", $Timestamp);
$ThisMonth = getdate($Timestamp);
$StartDay = $ThisMonth['wday'];
&lt;/pre&gt;&lt;br /&gt;
Thanks for any help offered.&lt;br /&gt;
&lt;br /&gt;
*EDIT*&lt;br /&gt;
&lt;br /&gt;
I figured it out. Apparently the "mktime()" function in PHP doesn't adhere to regular coding practices, and the month range is 1-12, not 0-11. I modified the code as shown below and it works properly now.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
$Timestamp = mktime(0, 0, 0, ($CurMonth + 1), 1, $CurYear);
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
-&lt;em&gt;&lt;strong&gt;&lt;span style="color: Red;"&gt;S&lt;/span&gt;&lt;span style="color: Purple;"&gt;e&lt;/span&gt;&lt;span style="color: Blue;"&gt;p&lt;/span&gt;&lt;span style="color: Green;"&gt;h&lt;/span&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;&lt;span style="color: Purple;"&gt;r&lt;/span&gt;&lt;span style="color: Blue;"&gt;o&lt;/span&gt;&lt;span style="color: Green;"&gt;t&lt;/span&gt;&lt;span style="color: Red;"&gt;h&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/phpstuff/418872/418872/ReadMessage.aspx#418872</guid>
      <pubDate>Tue, 28 Sep 2010 09:01:45 -0700</pubDate>
    </item>
    <item>
      <title>Calendar</title>
      <link>http://www.programmersheaven.com/download/56193/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/wasiqul_islam/"&gt;wasiqul_islam&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56193/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;Free-ware. A simple program that displays a calendar for your desired month of year. It was developed on Visual Basic at 2002.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56193/download.aspx</guid>
      <pubDate>Tue, 11 Aug 2009 04:06:20 -0700</pubDate>
    </item>
    <item>
      <title>Calendar</title>
      <link>http://www.programmersheaven.com/download/56193/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/wasiqul_islam/"&gt;wasiqul_islam&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56193/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;Free-ware. A simple program that displays a calendar for your desired month of year. It was developed on Visual Basic at 2002.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56193/download.aspx</guid>
      <pubDate>Tue, 11 Aug 2009 03:49:11 -0700</pubDate>
    </item>
    <item>
      <title>Flash Web Calendar</title>
      <link>http://www.programmersheaven.com/download/56109/download.aspx</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/phpjabbers/"&gt;phpjabbers&lt;/a&gt; submitted a new &lt;a href="http://www.programmersheaven.com/download/56109/download.aspx"&gt;file&lt;/a&gt;.&lt;/p&gt;Flash Web Calendar is a stand alone script which allows you to easily put a calendar on your web sites. The web calendar uses flash to display days and notes associated with each date and a PHP script is used to manage all the calendar data - events, colors, size.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/download/56109/download.aspx</guid>
      <pubDate>Sat, 30 May 2009 02:28:37 -0700</pubDate>
    </item>
    <item>
      <title>Re: little help please</title>
      <link>http://www.programmersheaven.com/mb/pasprog/382384/382559/ReadMessage.aspx#382559</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/pasprog/382384/382559/ReadMessage.aspx#382559"&gt;Re: little help please&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;: how to arrange the calender into&lt;br /&gt;
: &lt;br /&gt;
: jan                       feb             march&lt;br /&gt;
: april                     may             june&lt;br /&gt;
: july                      august          september&lt;br /&gt;
: october                   november        desember&lt;br /&gt;
: &lt;br /&gt;
: without using graphics&lt;br /&gt;
: &lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Program Calendar ;

Uses
   Crt ;

Type
   MonthType = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec) ;

CONST
   MONTHS   :  Array [Jan .. Dec] of String[9] = ('JANUARY',
                                                  'FEBRUARY',
                                                  'MARCH',
                                                  'APRIL',
                                                  'MAY',
                                                  'JUNE',
                                                  'JULY',
                                                  'AUGUST',
                                                  'SEPTEMBER',
                                                  'OCTOBER',
                                                  'NOVEMBER',
                                                  'DECEMBER') ;

   WINWIDE  = 23 ;
   WINHIGH  = 6 ;
   LEFT  :  Array [Jan .. Dec] of Byte = (1, WINWIDE + 2, 2*WINWIDE + 4,
                                          1, WINWIDE + 2, 2*WINWIDE + 4,
                                          1, WINWIDE + 2, 2*WINWIDE + 4,
                                          1, WINWIDE + 2, 2*WINWIDE + 4) ;
   RIGHT :  Array [Jan .. Dec] of Byte = (WINWIDE, 2*WINWIDE + 2, 3*WINWIDE + 4,
                                          WINWIDE, 2*WINWIDE + 2, 3*WINWIDE + 4,
                                          WINWIDE, 2*WINWIDE + 2, 3*WINWIDE + 4,
                                          WINWIDE, 2*WINWIDE + 2, 3*WINWIDE + 4) ;
   TOP   :  Array [Jan .. Dec] of Byte = (1, 1, 1,
                                          WINHIGH + 1, WINHIGH + 1, WINHIGH + 1,
                                          2*WINHIGH + 1, 2*WINHIGH + 1 , 2*WINHIGH + 1,
                                          3*WINHIGH + 1, 3*WINHIGH + 1 , 3*WINHIGH + 1) ;
   BOTTOM:  Array [Jan .. Dec] of Byte = (WINHIGH, WINHIGH, WINHIGH,
                                          2*WINHIGH, 2*WINHIGH, 2*WINHIGH,
                                          3*WINHIGH, 3*WINHIGH, 3*WINHIGH,
                                          4*WINHIGH, 4*WINHIGH, 4*WINHIGH) ;

      
      Procedure Show (Mon : MonthType) ;
      
      begin { Show }
         Window (LEFT[Mon], TOP[Mon], RIGHT[Mon], BOTTOM[Mon]) ;
         if Ord(Mon) MOD 2 = 0 then
            TextBackground(RED) 
         else
            TextBackground(BLUE) ;
         ClrScr ;
         WriteLn (Months[Mon]:WINWIDE - 2)
      end ; { Show }

Var
   Mon   :  MonthType ;
   i     :  1 .. 4 ;

begin { Calendar }
   TextBackground(BLACK) ;
   ClrScr ;
   for Mon := Jan to Dec do 
      Show(Mon) ;
   ReadLn
end.  { Calendar }
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/382384/382559/ReadMessage.aspx#382559</guid>
      <pubDate>Wed, 03 Dec 2008 15:42:13 -0700</pubDate>
    </item>
    <item>
      <title>Re: little help please</title>
      <link>http://www.programmersheaven.com/mb/pasprog/382384/382536/ReadMessage.aspx#382536</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Actor/"&gt;Actor&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/pasprog/382384/382536/ReadMessage.aspx#382536"&gt;Re: little help please&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/pasprog/Board.aspx"&gt;Pascal&lt;/a&gt; forum.&lt;/p&gt;: : : Hi every one&lt;br /&gt;
: : : I have a project about a calendar and I need a little help&lt;br /&gt;
: : : I want the program to ask me about the day ,the month and the year &lt;br /&gt;
: : : and display the monthes in 3 raws and 4 columns.please reply me as &lt;br /&gt;
: : : soon as possible guys&lt;br /&gt;
: : : &lt;br /&gt;
: : &lt;br /&gt;
: how to arrange the calender into&lt;br /&gt;
: &lt;br /&gt;
: jan                       feb             march&lt;br /&gt;
: april                     may             june&lt;br /&gt;
: july                      august          september&lt;br /&gt;
: october                   november        desember&lt;br /&gt;
: &lt;br /&gt;
: without using graphics&lt;br /&gt;
: &lt;br /&gt;
Use the &lt;strong&gt;Window&lt;/strong&gt; procedure that is part of the CRT unit.  You should be able to create a separate window for each month, each 25 columns wide and 6 rows high.  The problem should then reduce to one of writing one calendar routine which could then be repeated in each window.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/382384/382536/ReadMessage.aspx#382536</guid>
      <pubDate>Wed, 03 Dec 2008 08:08:54 -0700</pubDate>
    </item>
    <item>
      <title>Re: calender</title>
      <link>http://www.programmersheaven.com/mb/ASPNET/373797/373899/ReadMessage.aspx#373899</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/bradwang/"&gt;bradwang&lt;/a&gt; posted the message '&lt;a href="http://www.programmersheaven.com/mb/ASPNET/373797/373899/ReadMessage.aspx#373899"&gt;Re: calender&lt;/a&gt;' on the &lt;a href="http://www.programmersheaven.com/mb/ASPNET/Board.aspx"&gt;ASP.NET&lt;/a&gt; forum.&lt;/p&gt;: &lt;br /&gt;
: how to change  default current month of the calender?&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
I firmly believe there's such a property which enables you to set the default month in the Calendar control...&lt;br /&gt;
&lt;br /&gt;
I'm Brad Wang...&lt;br /&gt;
.NET Freelancer from China&lt;br /&gt;
MSN: brad_wang_cn@hotmail.com&lt;br /&gt;
Skype: brad_wang</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ASPNET/373797/373899/ReadMessage.aspx#373899</guid>
      <pubDate>Sun, 03 Aug 2008 19:47:57 -0700</pubDate>
    </item>
  </channel>
</rss>