Skip to content
managing-date-time logo

Date and Time Handling

managing-date-time

Standardizes date handling and timezone logic (UTC/PKT) for travel bookings. Use when displaying or saving tour dates.

itsmeAlee/Tourly20installs0stars

SKILL.md

Full skill instructions

Date and Time Handling

When to use this skill

  • Displaying departure/​arrival times.
  • Calculating trip duration.
  • Saving booking dates to Appwrite.

Standard Practices

  • Storage: Always save dates as ISO 8601 Strings in UTC.
  • Display: Use the user's local time or a fixed PKT (Pakistan Standard Time) if the tour is localized.
  • Library: Use date-fns for complex math (e.g., addDays, differenceInDays).

Example (Date-fns)

import { format, parseISO } from 'date-fns';

export const formatTourDate = (isoString: string) => {
    const date = parseISO(isoString);
    return format(date, 'MMM dd, yyyy'); // e.g., "Jan 15, 2026"
};

Instructions

  • Input: Use <input type="date"> or a custom calendar component (see managing-date-selection).
  • Validation: Ensure end date is not before start date.

More skills from itsmeAlee

writing-utility-helpers logo
itsmeAlee/Tourly2

writing-utility-helpers

Standardizes frequent utility functions for currency, dates, and strings. Use to maintain consistency in formatting.

0 0
View
optimizing-iconography logo
itsmeAlee/Tourly2

optimizing-iconography

Rules for using icons efficiently to maintain performance. Use when adding icons from Lucide React.

0 0
View
handling-data-fetching logo
itsmeAlee/Tourly2

handling-data-fetching

Strategy for fetching data using React Server Components (RSC) and managing cache. Use for initial page loads and SEO-optimized data.

0 0
View
managing-design-system logo
itsmeAlee/Tourly2

managing-design-system

Defines the core visual identity, color tokens, interaction patterns, and signature UI layouts for Tourly. Use when implementing or styling any frontend component to ensure brand consistency.

0 0
View

Advanced code-splitting and lazy-loading techniques. Use to reduce initial bundle size and speed up the homepage.

0 0
View
refactoring-codebase logo
itsmeAlee/Tourly2

refactoring-codebase

Guidelines for maintaining a clean codebase through limits and abstraction. Use when a file or component becomes difficult to read.

0 0
View

Advanced middleware logic for security and routing. Use for global rate limiting, security headers, and protection of admin routes.

0 0
View
managing-seo-metadata logo
itsmeAlee/Tourly2

managing-seo-metadata

Strategies for dynamic SEO using Next.js Metadata API. Use to generate social share cards and search-engine-friendly titles for tours.

0 0
View
handling-global-errors logo
itsmeAlee/Tourly2

handling-global-errors

Unified strategy for catching and displaying API and network errors. Use throughout the application logic.

0 0
View

Subscribes to Appwrite Realtime events for live updates. Use when building dashboards or live booking counters.

0 0
View
architecting-components logo
itsmeAlee/Tourly2

architecting-components

Defines rules for Atomic Design and separating logic from UI. Use when creating new components in the src directory.

0 0
View

Defines a pattern for abstracting Appwrite database calls into dedicated service files. Use to keep components clean and reusable.

0 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View