org.das2.datum.format.FormatStringFormatter

This is based on the C-style format strings introduced in Java 5 that we can now use. When used with times, the format should be specified using URI_Templates like $Y$m$dT$H:$M:$S. TODO: See Autoplot's DataSetUtil.toString, which shows use with Calendar objects. Here is a table showing some examples:
%9.2fdecimal with two fractional places
%9.2edecimal in scientific notation
%.2fdecimal with two fractional places, and some number of total spaces
%5dinteger in five spaces.
$Y$m$dZtime specification.

FormatStringFormatter( String formatStr, boolean units )

create a new instance based on the Java format string.


format

format( Datum datum ) → String

Parameters

datum - a Datum

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]

format( Datum datum, Units units ) → String

toString

toString( ) → String

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]