Date Output
Predict Output Beginner
Question
What does this command produce?
Code
date +%Y
Hint
date +%Y prints the 4-digit year.
Explanation
The date +%Y command prints the current year in 4-digit format. The +%Y format specifier extracts just the year. Other formats: +%m (month), +%d (day), +%H:%M (time).
Related Resources
Related Lessons
- Command Line
Learn CLI.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.