Module spreadsheet_ods::format
source · Expand description
Defines one ValueFormatXX per ValueType for textual formatting of those values.
use spreadsheet_ods::{ValueType};
use spreadsheet_ods::format::{FormatCalendarStyle, FormatNumberStyle, ValueFormatDateTime, ValueFormatNumber};
let mut v = ValueFormatDateTime::new_named("dt0");
v.part_day().long_style().build();
v.part_text(".").build();
v.part_month().long_style().build();
v.part_text(".").build();
v.part_year().long_style().build();
v.part_text(" ").build();
v.part_hours().long_style().build();
v.part_text(":").build();
v.part_minutes().long_style().build();
v.part_text(":").build();
v.part_seconds().long_style().build();
let mut v = ValueFormatNumber::new_named("n3");
v.part_number().decimal_places(3).build();
Structs§
- One structural part of a value format.
- Adds a format part to this format.
- Adds a format part to this format.
- The number:currency-symbol element specifies whether a currency symbol is displayed in a currency style. The content of this element is the text that is displayed as the currency symbol. If the element is empty or contains white space characters only, the default currency symbol for the currency style or the language and country of the currency style is displayed.
- The number:day element specifies a day of a month in a date.
- The number:day-of-week element specifies a day of a week in a date.
- The number:era element specifies an era in which a year is counted.
- Builder for FormatPart with type Number.
- The number:fraction element specifies the display formatting properties for a number style that should be displayed as a fraction.
- The number:hours element specifies whether hours are displayed as part of a date or time.
- The number:minutes element specifies whether minutes are displayed as part of a date or time. The number:minutes element is usable within the following elements:
- Builder for FormatPart with type Month.
- Builder for FormatPart with type Number.
- The number:quarter element specifies a quarter of the year in a date.
- Builder for FormatPart with type ScientificNumber.
- The number:seconds element specifies whether seconds are displayed as part of a date or time.
- Adds a format part to this format.
- Adds a format part to this format.
- The number:week-of-year element specifies a week of a year in a date.
- The number:year element specifies a year in a date. The number:year element is usable within the following element:
- Formatting for Boolean.
- Formatting for Boolean.
- Formatting for Boolean.
- Formatting for Boolean.
- Formatting for Boolean.
- Reference
- Formatting for Boolean.
- Formatting for Boolean.
- A style-map is one way for conditional formatting of value formats.
Enums§
- Calendar types.
- Flag for several PartTypes.
- Identifies the structural parts of a value format.
Traits§
- Trait used by the builder types.
Functions§
- Creates a new number format.
- Creates a new currency format.
- Creates a new currency format.
- Creates a new date format D.M.Y
- Creates a new date format YYYY-MM-DD
- Creates a new date format M/D/Y
- Creates a datetime format Y-M-D H:M:S
- Creates a new number format.
- Creates a new currency format.
- Creates a new currency format.
- Creates a new date format D.M.Y
- Creates a new date format M/D/Y
- Creates a datetime format Y-M-D H:M:S
- Creates a new number format.
- Creates a new number format with a fixed number of decimal places.
- Creates a new percentage format.
- Creates a new time-Duration format H:M:S
- Creates a new time-Duration format H:M:S
- Creates a new number format.
- Creates a new number format with a fixed number of decimal places.
- Creates a new percentage format.
- Creates a new time-Duration format H:M:S
- Creates a new time format H:M:S