Package net.time4j

Interface IsoUnit

All Superinterfaces:
ChronoUnit
All Known Subinterfaces:
IsoDateUnit, IsoTimeUnit
All Known Implementing Classes:
CalendarUnit, ClockUnit, Weekcycle

public interface IsoUnit extends ChronoUnit

Represents a unit suitable for timestamps which are compositions of date and time (PlainTimestamp).

Author:
Meno Hochschild
  • Method Summary

    Modifier and Type
    Method
    Description
    char
    Gets the format symbol which is used to display this time unit in canonical representations of timespans.

    Methods inherited from interface net.time4j.engine.ChronoUnit

    getLength, isCalendrical
  • Method Details

    • getSymbol

      char getSymbol()

      Gets the format symbol which is used to display this time unit in canonical representations of timespans.

      Canonical timespan formats follow ISO-8601. For example, the day unit is represented by the symbol D. Note that the letters P and T must not be used because these special characters are for structuring, the display. In ISO-8601 following symbols are defined:

      • Y - year
      • M - month or minute
      • W - week
      • D - day
      • H - hour
      • S - second
      • P - qualifies a timespan (period)
      • T - separates date and time part

      If this method yields as special case a digit 1-9 then Time4J expects a fractional display of preceding second unit S that is nanoseconds, microseconds and milliseconds. Time4J will use the comma as decimal separation char in the canonical display as recommended by ISO-8601 unless the system property "net.time4j.format.iso.decimal.dot" is set to true (which causes the usage of a dot).

      Returns:
      char (ASCII-NULL if undefined)
      See Also:
      Duration.toString()