Beta

Give me nicely formatted dates

Description:

We would like to have a function that given any date in the calendar would output the full name of the date "Day, Number(th/st/nd/rd), Month, Year" so we can feed it random dates and get a nice output.

We have two initial arrays, one contains the months and the other one the days of the week.

There is also the final function to guide you a little bit about the output that it is expected.

function FullDate(day, month, year) {
    var full_date = daysofweek[DayOfWeek(day, month, year)] + ' ' + 
              day + Nths(day) + '  ' +  monthsofyear[month-1] + '  ' + year;
    return full_date;
}

What you need to do:

Complete the following functions (Nths) and (DayOfWeek) to create dates in the specified required output.

The test example dates are some of the most important dates in astronomy and physics, if you feel curious about those :)

Arrays
Algorithms
Date Time

Stats:

CreatedDec 3, 2015
PublishedDec 3, 2015
Warriors Trained70
Total Skips2
Total Code Submissions140
Total Times Completed21
JavaScript Completions21
Total Stars1
% of votes with a positive feedback rating77% of 11
Total "Very Satisfied" Votes7
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes1
Total Rank Assessments11
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • mypitit Avatar
  • Balkoth Avatar
Ad