< prev index next >

src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java

Print this page




1467      * The characters '#', '{' and '}' are reserved for future use.
1468      * The characters '[' and ']' indicate optional patterns.
1469      * The following pattern letters are defined:
1470      * <pre>
1471      *  Symbol  Meaning                     Presentation      Examples
1472      *  ------  -------                     ------------      -------
1473      *   G       era                         text              AD; Anno Domini; A
1474      *   u       year                        year              2004; 04
1475      *   y       year-of-era                 year              2004; 04
1476      *   D       day-of-year                 number            189
1477      *   M/L     month-of-year               number/text       7; 07; Jul; July; J
1478      *   d       day-of-month                number            10
1479      *   g       modified-julian-day         number            2451334
1480      *
1481      *   Q/q     quarter-of-year             number/text       3; 03; Q3; 3rd quarter
1482      *   Y       week-based-year             year              1996; 96
1483      *   w       week-of-week-based-year     number            27
1484      *   W       week-of-month               number            4
1485      *   E       day-of-week                 text              Tue; Tuesday; T
1486      *   e/c     localized day-of-week       number/text       2; 02; Tue; Tuesday; T
1487      *   F       week-of-month               number            3
1488      *
1489      *   a       am-pm-of-day                text              PM
1490      *   h       clock-hour-of-am-pm (1-12)  number            12
1491      *   K       hour-of-am-pm (0-11)        number            0
1492      *   k       clock-hour-of-am-pm (1-24)  number            0
1493      *
1494      *   H       hour-of-day (0-23)          number            0
1495      *   m       minute-of-hour              number            30
1496      *   s       second-of-minute            number            55
1497      *   S       fraction-of-second          fraction          978
1498      *   A       milli-of-day                number            1234
1499      *   n       nano-of-second              number            987654321
1500      *   N       nano-of-day                 number            1234000000
1501      *
1502      *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
1503      *   v       generic time-zone name      zone-name         PT, Pacific Time
1504      *   z       time-zone name              zone-name         Pacific Standard Time; PST
1505      *   O       localized zone-offset       offset-O          GMT+8; GMT+08:00; UTC-08:00;
1506      *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15
1507      *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15
1508      *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00
1509      *
1510      *   p       pad next                    pad modifier      1
1511      *
1512      *   '       escape for text             delimiter




1467      * The characters '#', '{' and '}' are reserved for future use.
1468      * The characters '[' and ']' indicate optional patterns.
1469      * The following pattern letters are defined:
1470      * <pre>
1471      *  Symbol  Meaning                     Presentation      Examples
1472      *  ------  -------                     ------------      -------
1473      *   G       era                         text              AD; Anno Domini; A
1474      *   u       year                        year              2004; 04
1475      *   y       year-of-era                 year              2004; 04
1476      *   D       day-of-year                 number            189
1477      *   M/L     month-of-year               number/text       7; 07; Jul; July; J
1478      *   d       day-of-month                number            10
1479      *   g       modified-julian-day         number            2451334
1480      *
1481      *   Q/q     quarter-of-year             number/text       3; 03; Q3; 3rd quarter
1482      *   Y       week-based-year             year              1996; 96
1483      *   w       week-of-week-based-year     number            27
1484      *   W       week-of-month               number            4
1485      *   E       day-of-week                 text              Tue; Tuesday; T
1486      *   e/c     localized day-of-week       number/text       2; 02; Tue; Tuesday; T
1487      *   F       day-of-week-in-month        number            3
1488      *
1489      *   a       am-pm-of-day                text              PM
1490      *   h       clock-hour-of-am-pm (1-12)  number            12
1491      *   K       hour-of-am-pm (0-11)        number            0
1492      *   k       clock-hour-of-day (1-24)    number            24
1493      *
1494      *   H       hour-of-day (0-23)          number            0
1495      *   m       minute-of-hour              number            30
1496      *   s       second-of-minute            number            55
1497      *   S       fraction-of-second          fraction          978
1498      *   A       milli-of-day                number            1234
1499      *   n       nano-of-second              number            987654321
1500      *   N       nano-of-day                 number            1234000000
1501      *
1502      *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
1503      *   v       generic time-zone name      zone-name         PT, Pacific Time
1504      *   z       time-zone name              zone-name         Pacific Standard Time; PST
1505      *   O       localized zone-offset       offset-O          GMT+8; GMT+08:00; UTC-08:00;
1506      *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15
1507      *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15
1508      *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00
1509      *
1510      *   p       pad next                    pad modifier      1
1511      *
1512      *   '       escape for text             delimiter


< prev index next >