7 kyu

Date formatter

Description:

You are to implement a getDate function, which takes a unix timestamp and a locale as input and returns the formatted date based on the locale.

the locale formats to use are stored in the preloaded structure formats. For example,

Example:

  • getDate(1481020142, 'en-GB') -> '06/12/2016' (format->'dd/mm/yyyy')
  • getDate(1481020142, 'de-DE') -> '06.12.2016' (format->'dd.mm.yyyy')
  • getDate(1481020142, 'hu-HU') -> '2016. 12. 06.' (format->'yyyy. mm. dd.')

little hint: don't choose the hard way

Date Time
Fundamentals

Stats:

CreatedDec 6, 2016
PublishedDec 6, 2016
Warriors Trained714
Total Skips9
Total Code Submissions1471
Total Times Completed142
JavaScript Completions142
Total Stars13
% of votes with a positive feedback rating72% of 56
Total "Very Satisfied" Votes35
Total "Somewhat Satisfied" Votes11
Total "Not Satisfied" Votes10
Total Rank Assessments7
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • LeTysker Avatar
  • Voile Avatar
  • G_kuldeep Avatar
Ad