Datetime Formatting logo

Datetime Formatting

Organization
cxcscmu
datetime-formatting

Format dates and times according to specific requirements for meeting confirmations

Overview

Publishercxcscmu
RepositorySkillLearnBench
Skill namedatetime-formatting
Stars
91
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by cxcscmu on GitHub. Read the source before you install it.

Installation

Install the Datetime Formatting AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/schedule-planning/datetime-formatting
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench.git /tmp/SkillLearnBench
mkdir -p .claude/skills
cp -r /tmp/SkillLearnBench/skills/b1-one-shot-claude-haiku-4-5/schedule-planning/datetime-formatting .claude/skills/datetime-formatting
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Datetime Formatting in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Datetime Formatting on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Datetime Formatting is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Date/Time Formatting Skill

Overview

This skill covers formatting dates and times in the specific formats required for meeting confirmation replies, including proper day names, 12-hour AM/PM format, and date formatting.

Key Concepts

Required Format Specifications

Date Format: {day_name}, {month} {DD}, {YYYY}

  • Example: Thursday, January 08, 2026
  • NOT: January 8th, 2026 or January 8, 2026
  • Two-digit day with leading zero
  • Full month name (not abbreviated)
  • Full day name (not abbreviated)

Time Format: {HH:MM AM/PM} - {HH:MM AM/PM}

  • Example: 09:00 AM - 10:30 AM
  • Two-digit hour with leading zero
  • Two-digit minute with leading zero (never just 9:00 AM)
  • Uppercase AM/PM with space before it

Code Examples

Format Date

python
from datetime import datetime

def format_date(date_obj):
    """Format datetime to 'Thursday, January 08, 2026' format"""
    return date_obj.strftime('%A, %B %d, %Y')

# Example
d = datetime(2026, 1, 8)
print(format_date(d))  # Thursday, January 08, 2026

Format Time Range

python
def format_time(hour, minute, use_am_pm=True):
    """Format single time as 'HH:MM AM/PM'"""
    time_obj = datetime(2026, 1, 1, hour, minute)
    if use_am_pm:
        return time_obj.strftime('%I:%M %p')
    else:
        return time_obj.strftime('%H:%M')

def format_time_range(start_hour, start_minute, end_hour, end_minute):
    """Format time range as 'HH:MM AM/PM - HH:MM AM/PM'"""
    start_time = format_time(start_hour, start_minute)
    end_time = format_time(end_hour, end_minute)
    return f'{start_time} - {end_time}'

# Example
print(format_time_range(9, 0, 10, 30))  # 09:00 AM - 10:30 AM
print(format_time_range(13, 30, 15, 0))  # 01:30 PM - 03:00 PM

Format Duration in Hours

python
def format_duration(duration_hours):
    """Format duration as 'X hour(s)' - match request format"""
    if duration_hours == int(duration_hours):
        hours = int(duration_hours)
        return f'{hours} hour' if hours == 1 else f'{hours} hours'
    else:
        # Handle fractional hours
        total_minutes = int(duration_hours * 60)
        if total_minutes % 60 == 0:
            hours = total_minutes // 60
            return f'{hours} hours'
        else:
            return f'{duration_hours} hours'

# Examples
print(format_duration(1.0))    # 1 hour
print(format_duration(1.5))    # 1.5 hours
print(format_duration(0.75))   # 0.75 hours

Complete Reply Generation

python
def generate_reply(recipient_name, meeting_date, start_hour, start_minute, end_hour, end_minute, duration_hours):
    """Generate complete meeting confirmation reply"""
    date_str = format_date(meeting_date)
    time_range = format_time_range(start_hour, start_minute, end_hour, end_minute)
    duration_str = format_duration(duration_hours)

    reply = f"""Hi,

Thank you for your meeting request.

I can be available:

Date: {date_str}
Time: {time_range}
Duration: {duration_str}

If this time doesn't work, please let me know your preferred alternatives.

Best regards,
ConSkillBench"""

    return reply

Timezone-Aware Formatting

python
import pytz
from datetime import datetime

def format_datetime_with_timezone(date_obj, hour, minute, timezone_name='US/Eastern'):
    """Format datetime with timezone context"""
    tz = pytz.timezone(timezone_name)
    # Create a timezone-aware datetime
    dt = tz.localize(datetime(date_obj.year, date_obj.month, date_obj.day, hour, minute))

    date_str = dt.strftime('%A, %B %d, %Y')
    time_str = dt.strftime('%I:%M %p')

    return date_str, time_str

Validate Format Compliance

python
import re

def validate_date_format(formatted_date):
    """Check if date follows correct format"""
    pattern = r'^[A-Z][a-z]+, [A-Z][a-z]+ \d{2}, \d{4}$'
    return bool(re.match(pattern, formatted_date))

def validate_time_format(formatted_time):
    """Check if time follows correct format"""
    pattern = r'^\d{2}:\d{2} [AP]M - \d{2}:\d{2} [AP]M$'
    return bool(re.match(pattern, formatted_time))

# Examples
print(validate_date_format('Thursday, January 08, 2026'))  # True
print(validate_date_format('January 8, 2026'))             # False
print(validate_time_format('09:00 AM - 10:30 AM'))         # True
print(validate_time_format('9:00 AM - 10:30 AM'))          # False

Common Formatting Errors to Avoid

  1. ❌ Single-digit day: January 8 → ✅ January 08
  2. ❌ Abbreviated day: Thu → ✅ Thursday
  3. ❌ Abbreviated month: Jan → ✅ January
  4. ❌ No leading zero on hour: 9:00 AM → ✅ 09:00 AM
  5. ❌ Lowercase AM/PM: 09:00 am → ✅ 09:00 AM
  6. ❌ Written ordinal: January 8th → ✅ January 08
  7. ❌ Year only 2 digits: January 08, 26 → ✅ January 08, 2026

Python datetime Directives Reference

DirectiveMeaningExample
%AFull weekday nameThursday
%BFull month nameJanuary
%dDay of month (02-31)08
%YYear with century2026
%IHour 12-hour (01-12)09
%MMinute (00-59)30
%pAM/PMAM

Best Practices

  1. Always use %I:%M %p for 12-hour format with AM/PM
  2. Always use %d for zero-padded days
  3. Always use %A, %B %d, %Y for complete date format
  4. Validate formatted output against required patterns
  5. Test edge cases: midnight, noon, early morning, late night
  6. When working with different timezones, convert before formatting

Frequently asked questions

What does the Datetime Formatting AI skill do?

Format dates and times according to specific requirements for meeting confirmations

Why use Datetime Formatting on TypingMind?

Because you install it once and use it with any model. Datetime Formatting is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Datetime Formatting in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/schedule-planning/datetime-formatting. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Datetime Formatting?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Datetime Formatting?

As many as you like. As long as a model supports skills, you can use Datetime Formatting with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Datetime Formatting AI skill free?

Yes. It is published on GitHub by cxcscmu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇