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 7637215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:52:55+00:00 2026-05-31T07:52:55+00:00

Given dayNumber is from 0 – 6 representing Monday – Sunday respectively. Can the

  • 0

Given dayNumber is from 0 – 6 representing Monday – Sunday respectively.

Can the Date / String objects be used to get the day of the week from dayNumber?

  • 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-31T07:52:56+00:00Added an answer on May 31, 2026 at 7:52 am

    This will give you a day based on the index you pass:

    var weekday=new Array(7);
    weekday[0]="Monday";
    weekday[1]="Tuesday";
    weekday[2]="Wednesday";
    weekday[3]="Thursday";
    weekday[4]="Friday";
    weekday[5]="Saturday";
    weekday[6]="Sunday";
    console.log("Today is " + weekday[3]);
    

    Outputs “Today is Thursday”

    You can alse get the current days index from JavaScript with getDay() (however in this method, Sunday is 0, Monday is 1, etc.):

    var d=new Date();
    console.log(d.getDay());
    

    Outputs 1 when it’s Monday.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following string: s = 'abcdefg*' How can I match it or any
Given a table with schema like this: id1 id2 day number How can I
I have to receive a string representing a date to process through time.strptime in
Given the following classes: class Department { public String Name { get; set; }
Given: http://www.foo.com/bar.html#baz How does one get the baz ? I can't find this as
Given long long int x, y; , I want a function that can compare
Possible Duplicate: PHP last day of the month Is there any function like $date->getMonthDays()
Given the following : // get the list of the players , in order
Given a storyboard-based application, how can any one view controller invoke the methods of
Given a class: class foo { public string a = ; public int b

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.