UMD Web Utilities Library
    Preparing search index...

    Function formatDateForDisplay

    • Creates a formatted date object with multiple presentation formats

      Converts a Date object into various human-readable string formats for displaying in different contexts (full date, day of week, time, etc.).

      Parameters

      • date: Date

        The Date object to format

      Returns {
          day: string;
          dayOfWeek: string;
          dayOfWeekLong: string;
          full: string;
          month: string;
          time: string;
      }

      Object with formatted date strings

      const formatted = formatDateForDisplay(new Date('2025-09-29T14:30:00'));
      // {
      // full: 'Sep 29, 2025',
      // dayOfWeekLong: 'Monday',
      // dayOfWeek: 'Mon',
      // month: 'Sep',
      // day: '29',
      // time: '2:30pm'
      // }