title: Converting Datetime C# type to Date javascript in asp.net mvc razor application
body: <p>I have a problem in converting date in javascript . i try this snippet:</p>
  
  <pre><code>$(document).ready(function () {
              var date = new Date();
              var d = date.getDate();
              var m = date.getMonth();
              var y = date.getFullYear();
  
              $('#calendar').fullCalendar({
                  theme: true,
                  header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},
                  editable: true,
                  events: [
                              {
                      title: 'Birthday Party',
                      start: new Date(y, m, d+1, 19, 0),
                      end: new Date(y, m, d+1, 22, 30),
                      allDay: false
                      }
                          ]
  
                  });
              });
  </code></pre>
  
  <p>and it works, but if i change it to:</p>
  
  <pre><code> $(document).ready(function () {
              var date = new Date();
              var d = date.getDate();
              var m = date.getMonth();
              var y = date.getFullYear();
  
              $('#calendar').fullCalendar({
                  theme: true,
                  header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},
                  editable: true,
                  events: [
                           @foreach (var m in Model.Get_List_Tache())
                            {
                          @:{ title: "Tache_description", start: new Date(@m.Begin_date.Year +"," + @m.Begin_date.Month +","+ @m.Begin_date.Day ) , end: new Date( @m.End_date.Year +"," +@m.End_date.Month +"," + @m.End_date.Day ) }
                            }
                          ]
  
                  });
              });
  </code></pre>
  
  <p>There is a syntaxic error in the format of date.</p>
  
  <p>So what is the reason of this error? How can i fix it?</p>