Rosetta Code: Date format - vague instructions

I wasn’t sure if I should combine this with the other issue with this challenge, but it seems separate.

The instructions give no clue of how to handle single digit months or days. The example has double digits for both:

Example output: ['2007-11-23', 'Friday, November 23, 2007']

So, a camper just complained because:

[ '2021-03-01', 'Monday, March 1, 2021' ]

wouldn’t pass. It will only pass with:

[ '2021-3-1', 'Monday, March 1, 2021' ]

I just thought I’d check and see if this was purposely vague - it seems like such an obvious omission.

The Challenge

I believe it is vague, because Rosetta are vague.

OK, perhaps. I’m not familiar with the relationship between the two - our app and their challenges.

In the past, we have had a mixture of:

  • remain as similar to the official platform as possible
  • tweak the challenges to be more specific, and easier/harder

So, I am not sure if anything will/should be done to change the current lesson. Others might have more preference/insight.

Rosetta version isn’t more specific because it doesn’t need to be. From Rosetta’s perspective both are okay and on the page there are various implementations - with zero-padding in numbers and without.

However since here tests require more specific result, it will be good to either clarify description, how such case should be handled, or change test to accept both.

2 Likes

It still seems odd to me to have such vagueness in a challenge description, but if the tests can handle both implementations, then that is at least a good improvement and should suffice.