Provides current date/time information for temporal queries and calculations
This skill ensures accurate, time-aware responses by teaching you to use system date commands for current time information instead of guessing or relying on outdated knowledge.
Use this skill whenever:
Symptoms indicating you need this skill:
Before (Wrong):
User: "What day is it?"
You: "I don't have access to current date information..."
After (Correct):
User: "What day is it?"
You: [Run: date '+%Y-%m-%d %A']
You: "Today is Friday, November 15, 2024"
| Task | Command |
|---|---|
| Current date/time | date '+%Y-%m-%d %A %H:%M:%S %Z' |
| Tomorrow's date | date -d "tomorrow" '+%Y-%m-%d %A' |
| Next Friday | date -d "next friday" '+%Y-%m-%d %A' |
| 30 days from now | date -d "+30 days" '+%Y-%m-%d %A' |
| Days until date | echo $(( ($(date -d "2025-12-31" +%s) - $(date +%s)) / 86400 )) |
Always start by running:
date '+%Y-%m-%d %A %H:%M:%S %Z'
This provides:
Use date command with descriptive strings:
# Tomorrow
date -d "tomorrow" '+%Y-%m-%d %A'
# Next Friday
date -d "next friday" '+%Y-%m-%d %A'
# 2 weeks from now
date -d "+2 weeks" '+%Y-%m-%d %A'
# Last month
date -d "last month" '+%Y-%m-%d'
Calculate days between dates:
# Days until Christmas
target=$(date -d "2025-12-25" +%s)
current=$(date +%s)
days=$(( ($target - $current) / 86400 ))
echo "$days days"
When answering time queries:
Never estimate or assume what "today" is.
Current date is NOT your training cutoff date.
When times matter, always note the timezone.
Instead of "recently" or "a few weeks ago", get specific dates.
User: "What day is today?"
Agent: Run date '+%Y-%m-%d %A' to get the current date. Response: "Today is Friday, November 15, 2024."
User: "What's next Wednesday's date?"
Agent: Run date -d "next wednesday" '+%Y-%m-%d %A' to calculate. Response: "Next Wednesday is November 20, 2024."
User: "How many days until Christmas?"
Agent: Calculate using echo $(( ($(date -d "2025-12-25" +%s) - $(date +%s)) / 86400 )). Response: "There are 40 days until Christmas (December 25, 2024)."
User: "Should I work on this today?"
Agent: Run date '+%A' to check the day. If Saturday/Sunday, suggest: "Today is Saturday. If this isn't urgent, you might want to wait until Monday to ensure your team can review and collaborate."
date '+Week %V of %Y'
date -Iseconds # Full ISO with timezone
day_num=$(date +%u)
if [[ $day_num -gt 5 ]]; then
echo "Weekend"
else
echo "Weekday"
fi
hour=$(date +%H)
if [[ $hour -lt 12 ]]; then
echo "Morning"
elif [[ $hour -lt 18 ]]; then
echo "Afternoon"
else
echo "Evening"
fi
date +%ZThis skill should be used before other tasks when time context matters:
Before responding to any time query, verify:
date command (not guessing)Remember: The date command is your source of truth for all time-related information. Always run it; never guess.