> ## Documentation Index
> Fetch the complete documentation index at: https://starrycodes.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# DateTime - Comparison Extensions

> Instantly check if a DateTime falls on today, yesterday, tomorrow, or in the past/future, ignoring time components for calendar accuracy.

{/*     title="⚡ Quick Usage" */}

{/* > */}

{/* // Check relative to today */}

{/* // Check relative to the current moment */}

{/*   // Show a reminder */}

{/* ``` */}

<Steps titleSize="h3">
  <Step title="📅 Relative to Today">
    {/*  ------------------ */}

    <ResponseField name="isToday()" type="bool">
      Checks if the date falls on the exact same calendar day as today (time ignored).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final today = DateTime.now();
      print(today.isToday()); // true
      ```
    </ResponseField>

    {/*  ------------------ */}

    <ResponseField name="isYesterday()" type="bool">
      Checks if the date was exactly one calendar day before today (time ignored).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final yesterday = myDate.subtract(const Duration(days: 1));
      print(yesterday.isYesterday()); // true
      ```
    </ResponseField>

    {/*  ------------------ */}

    <ResponseField name="isTomorrow()" type="bool">
      Checks if the date is exactly one calendar day after today (time ignored).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final tomorrow = myDate.add(const Duration(days: 1));
      print(tomorrow.isTomorrow()); // true
      ```
    </ResponseField>
  </Step>

  <Step title="⏳ Relative to Now">
    {/*  ------------------ */}

    <ResponseField name="isPast()" type="bool">
      Checks if the moment is in the past relative to the current system time (`DateTime.now()`).

      ```dart DateTime icon="calendar" lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      print(DateTime(2000, 1, 1).isPast()); // true
      ```
    </ResponseField>

    {/*  ------------------ */}

    <ResponseField name="isFuture()" type="bool">
      Checks if the moment is in the future relative to the current system time (`DateTime.now()`).

      ```dart DateTime icon="calendar" lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final reminder = DateTime.now().add(const Duration(hours: 1));
      print(reminder.isFuture()); // true
      ```
    </ResponseField>
  </Step>
</Steps>
