Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 953579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:04:30+00:00 2026-05-16T00:04:30+00:00

I have this code: var str = $(#datepicker).datepicker(getDate); var datestr = str.toString().split( ); switch(datestr[1])

  • 0

I have this code:

var str = $("#datepicker").datepicker("getDate");
    var datestr = str.toString().split(" ");
    switch(datestr[1]) {
        case "Jan":
        var datestrmon = "Яну";
        break;
        case "Feb":
        var datestrmon = "Фев";
        break;
        case "Mar":
        var datestrmon = "Мар";
        break;
        case "Apr":
        var datestrmon = "Апр";
        break;
        case "May":
        var datestrmon = "Май";
        break;
        case "Jun":
        var datestrmon = "Юни";
        break;
        case "July":
        var datestrmon = "Юли";
        break;
        case "Aug":
        var datestrmon = "Авг";
        break;
        case "Sep":
        var datestrmon = "Сеп";
        break;
        case "Oct":
        var datestrmon = "Окт";
        break;
        case "Nov":
        var datestrmon = "Ное";
        break;
        case "Dec":
        var datestrmon = "Дек";
        break;
        default:
        datestr[1];
    }
    alert(datestrmon);

I expect when the browser is alerting me datestrmon to alert “Юли” ,but it alerts me “undefined”.Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:04:30+00:00Added an answer on May 16, 2026 at 12:04 am
    1. Are you sure it’s “July” instead of “Jul”?
    2. Your default: case did not assign datestr[1] to datestrmon. Is it intentional?

    Anyway, consider using a lookup table instead of a big switch.

    var datestrmon = ({"Jan": "Яну",
                       "Feb": "Фев",
                       ...
                       "Dec": "Дек"})[datestr[1]] || datestr[1];
    //                                            ^^^^^^^^^^^^^
    //                                            optional, if you think stuff outside of
    //                                            the table could appear and need a
    //                                            fallback.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 510k
  • Answers 510k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Validation groups should be able to do what you want.… May 16, 2026 at 4:56 pm
  • Editorial Team
    Editorial Team added an answer What you put as code should work. $("#"+tableid) .tablesorter({widthFixed: true,… May 16, 2026 at 4:56 pm
  • Editorial Team
    Editorial Team added an answer object userID = System.Web.HttpContext.Current.Session["userID"]; if (userID == null) { throw… May 16, 2026 at 4:56 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

i have this js code : var str = javascript:__doPostBack('ctl00$M$List$_rli2$ctl06',''); alert (str); var str
i have this code: <script type=text/javascript> var str=KD-R35H2UND; var patt1=/[G|T|EE|EJU].*D/i; document.write(str.match(patt1)); </script> by using
I have this code somewhere in my plugin: $('tr', $this).hover(function(){ var cur_color = null;
so I have this code: $('input.myinput').each(function(){ var id = $(this).val(); var myajax = function(){
I have this following code $(function () { $.post(fetch_data.php?url=+$('#url').val(), { }, function(response){ var arrValues
Hello i have this code that works perfect in Firefox but in IE 8
I have this code: document.getElementById('img'+i).onclick = function(){popup_show('popup',array_msg[i]+'|||'+date('Y-m-d',strtotime(lec_date))+'-==-'+str_view_forConflict, 'AddEditSchedule;;popup_drag2;;EditSched;;'+String(array_msg_id[3])+';;view', 'popup_drag', 'popup_exit', 'screen-center', 0, 0);}; ...but
I have this code and wanted to know what all those event.client do? document.body.ondblclick
What would be a good way to do this. I have a string with
I have been typing a string inside a textfield, KD-G435MUN2D . I already use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.