-1

I want day of the date in dutch language?

For Ex:

    var date = new Date();
   console.log(date.getDate());

i want the day name in dutch language.

Gautam Rai
  • 2,445
  • 2
  • 21
  • 31

2 Answers2

2

To achieve this you can place the Dutch day name strings in an array. You can then access them based on the current day of the week, accessible from the Date object via the getDay() method. Try this:

var dutchDayNames = ['zondag','maandag','dinsdag','woensdag','donderdag','vrijdag','zaterda'];
var date = new Date();

console.log(dutchDayNames[date.getDay()]);

You could also use an i18n library, but that would be a little overkill if all you need is seven values in one other language.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
0

this plugin https://github.com/jquery/jquery-ui/tree/master/ui/i18n, can help

but For In case, if we want only day names in dutch,

var date = new Date();
    dayNames = ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
    console.log(dayNames[date.getDay()])
Gautam Rai
  • 2,445
  • 2
  • 21
  • 31