Beta
Give me nicely formatted dates
21mypitit
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
Similar Kata:
Stats:
Created | Dec 3, 2015 |
Published | Dec 3, 2015 |
Warriors Trained | 70 |
Total Skips | 2 |
Total Code Submissions | 140 |
Total Times Completed | 21 |
JavaScript Completions | 21 |
Total Stars | 1 |
% of votes with a positive feedback rating | 77% of 11 |
Total "Very Satisfied" Votes | 7 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 11 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |