Learn the Date Object by Building a Date Formatter - Step 28

Tell us what’s happening:

It keeps saying follow this format: mm-dd-yyyy h Hours m minutes and replace mm,dd,yyyy,h and m with month, day, year, hours, and minutes. I do not see where the problem is. I have been working this for 2 hours and I know its simple (ffs I hope it is) and I am becoming flabbergasted. Please, Obi-You-Code-Gods, point me to where it is and I shall look for it. Thanks for the help.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region


  switch (dateOptionsSelectElement.value) {
    case "yyyy-mm-dd":
      currentDateParagraph.textContent = formattedDate
        .split("-")
        .reverse()
        .join("-");
      break;
    case "mm-dd-yyyy-h-m":
      currentDateParagrah.textContent = `${month}-${day}-${year} ${hours} Hours ${minutes} Minutes`;
      break;
            
            
    }

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0

Challenge Information:

Learn the Date Object by Building a Date Formatter - Step 28

You have a typo here: Paragraph.

1 Like

That was one of my problems, but it still gave and error. So I reset, retyped and it finally took it. Up until this step, I was cooking. Then like a ‘wait-a-minute’ vine in a dark wooded trail, I was flat on my face looking for my glasses in the dark.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.