title: How to change date value to Unicode with Javascript?
body: <p>How can I convert a month and year value into Unicode using Javascript? For instance, "6, 2013" would become "\u1046, \u1042\u1040\u1041\u1043" (Myanmar text).</p>
  
  <p>Patrick pointed me to Codepen where I got this:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
    var d = new Date();
    var mn = (d.getMonth()+1);
    var dn = d.getDate();
    var yn = d.getFullYear();
  
    var toMyanmar = function (string) {
      var unicodeString = '';
      for (var i=0; i &lt; string.length; i++) {
        var char = string[i];
        if (parseInt(char),16) {
          char = String.fromCharCode(string.charCodeAt(i) + 4112)
        }
        unicodeString += char;
      }
      return unicodeString;
    }
  
    document.write("&lt;br/&gt;Myanmar Date: ");
    document.write(toMyanmar(''+ mn) + ', ');
    document.write(toMyanmar(''+ dn) + ', ');
    document.write(toMyanmar(''+ yn));
    document.write("&lt;br/&gt;Date; Latin/Arabic numerals: " + mn + ', ' + dn + ', ' + yn);
  &lt;/script&gt;
  
  &lt;body style="font-family:'Myanmar Text',Arial;"&gt;&lt;/body&gt;
  </code></pre>
  
  <p>Zero (0; u1040, #4160) was ignored by this script until I moved the radix number to the same line as "parseInt". (mmrtext.ttf or similar Unicode font is needed to see characters displayed.)
    So, this now works well for my purpose. And I think will be be the basis for future transcoding of character pages since Myanmar-related languages use many different sets.
    Thanks a million until you are better paid.
    R. Holland</p>