Forum Discussion

nado's avatar
nado
Occasional Contributor
12 months ago

about month name differences

Hi Guys,

I have a problem with the dates again. My computer language is Deutsch and my testing area is English. So I want to select for example a day in december but the test complete try to find the dezember instead of december, so how can I convert the month dates by using scripts?

  • nado's avatar
    nado
    Occasional Contributor

    Actually I've changed the computer language than it worked. Now the system and the computer have the same languages. Not need to work on it anymore. Thanks a lot.

  • yes same problem i was faced long back. so i written one function u can use if u want

    function convertGermanToEnglishMonth(germanMonth) {
    const monthMappings = {
    'Januar': 'January',
    'Februar': 'February',
    'März': 'March',
    'April': 'April',
    'Mai': 'May',
    'Juni': 'June',
    'Juli': 'July',
    'August': 'August',
    'September': 'September',
    'Oktober': 'October',
    'November': 'November',
    'Dezember': 'December',
    };

    return monthMappings[germanMonth] || germanMonth;
    }

     

    • nado's avatar
      nado
      Occasional Contributor

      Thanks a lot, I will also try this

  • Give us an example of your script that's failing and we can try to help fix that.