One More Formatting
Let's practice more with date formats! The table with the most common codes is below.
| Format code | Meaning | Example |
|---|---|---|
%d | Day of the month as a zero-padded decimal number | 01, 02, ..., 30, 31 |
%m | Month as a zero-padded decimal number | 01, 02, ..., 11, 12 |
%y | Year without century as a zero-padded decimal number | 00, 01, 02, ..., 98, 99 |
%Y | Year with century as a decimal number | 0001, 0002, 1999, 2000, 2001, ... |
%b | Month as locale’s abbreviated name | Jan, Feb, ..., Nov, Dec |
%B | Month as locale’s full name | January, February, ..., November, December |
%a | Weekday as locale’s abbreviated name | Sun, Mon, ..., Fri, Sat |
%A | Weekday as locale’s full name | Sunday, Monday, ..., Friday, Saturday |
Taak
Swipe to start coding
Format the same date object as before into the format: "Wednesday, 11 of March, 1998".
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 6
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Suggested prompts:
Vat dit hoofdstuk samen
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 3.23
One More Formatting
Veeg om het menu te tonen
Let's practice more with date formats! The table with the most common codes is below.
| Format code | Meaning | Example |
|---|---|---|
%d | Day of the month as a zero-padded decimal number | 01, 02, ..., 30, 31 |
%m | Month as a zero-padded decimal number | 01, 02, ..., 11, 12 |
%y | Year without century as a zero-padded decimal number | 00, 01, 02, ..., 98, 99 |
%Y | Year with century as a decimal number | 0001, 0002, 1999, 2000, 2001, ... |
%b | Month as locale’s abbreviated name | Jan, Feb, ..., Nov, Dec |
%B | Month as locale’s full name | January, February, ..., November, December |
%a | Weekday as locale’s abbreviated name | Sun, Mon, ..., Fri, Sat |
%A | Weekday as locale’s full name | Sunday, Monday, ..., Friday, Saturday |
Taak
Swipe to start coding
Format the same date object as before into the format: "Wednesday, 11 of March, 1998".
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 6
single