<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tags/Code Convention on Emad Alashi</title>
    <link>https://emadashi.com/tags/code-convention/</link>
    <description>Recent content in Tags/Code Convention on Emad Alashi</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 26 Feb 2009 22:01:17 +0000</lastBuildDate>
    <atom:link href="https://emadashi.com/tags/code-convention/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>JavaScript Date Object and Code Convention</title>
      <link>https://emadashi.com/2009/02/javascript-datetime-and-code-convention/</link>
      <pubDate>Thu, 26 Feb 2009 22:01:17 +0000</pubDate>
      <guid>https://emadashi.com/2009/02/javascript-datetime-and-code-convention/</guid>
      <description>&lt;p&gt;“is Code Convention important?”, I couldn&amp;rsquo;t find better time to answer this with a big, decorated, shiny, flashing “YES” more than now!&lt;/p&gt;
&lt;p&gt;I was doing some coding with JavaScript in which I needed to create a Date object and add to it 30 days, simple job! So I did the following:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1256\uc1 \deff0{\fonttbl{\f0\fnil\fcharset178\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red242\green235\blue227;\red0\green0\blue0;\red0\green128\blue0;}??\fs20 \cf1\cb2\highlight2 var\cf0  x = \cf1 new\cf0  Date();\par ??    x.setFullYear(2009, 3, 12);\cf4 //Create date 12th of March, 2009\par ??\cf0     x.setDate(x.getDate() + 30);\par ??    document.writeln(x);}
--&gt;
&lt;div style=&#34;font-size: 10pt; background: #f2ebe3; color: black; font-family: courier new&#34;&gt;
  &lt;p style=&#34;margin: 0px&#34;&gt;
    &lt;span style=&#34;color: blue&#34;&gt;    var&lt;/span&gt; x = &lt;span style=&#34;color: blue&#34;&gt;new&lt;/span&gt; Date();
  &lt;/p&gt;</description>
    </item>
  </channel>
</rss>
