Why do I not get a formated date with this javascript-script? -


i new javascript, maybe missed obvious.

i have following script (see some other answer):

<script> var d = new date(); document.getelementbyid("demo").innerhtml = d.tolocaleformat("dd.mm.yyyy"); </script> 

which want use create formatted date in jacasvript. if date today (26 june 2015) expect script produce following string:

26.06.2015 

however, following:

dd.mm.yyyy 

is other answer wrong? how can formatted date without library?

i tried use parse or format instead without success.

try code:

    <script>         var d = new date();         document.getelementbyid("demo").innerhtml = d.tolocaleformat("%d.%m.%y");    </script> 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -