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 |
Task
Swipe to start coding
Format the same date
object as before into the format: "Wednesday, 11 of March, 1998".
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 3.23
One More Formatting
Swipe to show menu
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 |
Task
Swipe to start coding
Format the same date
object as before into the format: "Wednesday, 11 of March, 1998".
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 3.23SectionΒ 1. ChapterΒ 6
single