This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

FormatWidth

npm Package @angular/common
Module import { FormatWidth } from '@angular/common';
Source common/src/i18n/locale_data_api.ts

Overview

      
      enum FormatWidth {
  Short
  Medium
  Long
  Full
}
    

Description

Multiple widths are available for formats: short (minimal amount of data), medium (small amount of data), long (complete amount of data), full (complete amount of data and extra information).

For example the date-time formats for the english locale will be:

  • 'short': 'M/d/yy, h:mm a' (e.g. 6/15/15, 9:03 AM)
  • 'medium': 'MMM d, y, h:mm:ss a' (e.g. Jun 15, 2015, 9:03:01 AM)
  • 'long': 'MMMM d, y, h:mm:ss a z' (e.g. June 15, 2015 at 9:03:01 AM GMT+1)
  • 'full': 'EEEE, MMMM d, y, h:mm:ss a zzzz' (e.g. Monday, June 15, 2015 at 9:03:01 AM GMT+01:00)

Members

      
      Short
    

      
      Medium
    

      
      Long
    

      
      Full