Next: Coding Scheme, Previous: Obsolete Special Texts, Up: Top [Contents][Index]
Gcal 4.1 is able to represent text variables, special texts and date formats especially in a very comfortable and uniform manner by using a format instruction.
Here comes the description of the format instruction components, now called format in the further context. In general, the template of a format instruction is:
alignment [sign] [zero] width [style] [suffix] format
If a format of above mentioned template is used, its components must be specified in the above mentioned order, at which the definition of the components embraced by ‘[ ]’ is of course optional. The single components of the format instruction are assembled as follows:
Character | Description of the components |
Alignment group (exactly one member must be defined): | |
< | Field contents is placed at the left margin of the field by using the width width |
: | Field contents is placed in centered manner in the field by using the width width |
> | Field contents is placed at the right margin of the field by using the width width |
Sign (may be defined): | |
+ | Numerical value is provided with leading sign |
Zero (may be defined): | |
0 | Numerical value is filled with leading zero(es) |
Width (must be defined): | |
n | Field has the width n (actual range 1…256). |
Style group (exactly one member may be defined): | |
u | Field contents is converted to upper-case letters |
l | Field contents is converted to lower-case letters |
w | Field contents is converted to capitalized words |
Suffix (may be defined): | |
& | Numerical value is provided with an Ordinal Number suffix |
Format group (exactly one member must be defined): | |
* | Field contents is not cut after position width |
# | Field contents is cut after position width |
If a given width component is greater 256 but less than 999, a field width of 256 is assumed. But if a given width component is zero, this interrupts the interpretation phase of Gcal so that the complete format is not interpreted anymore and is therefore displayed respectively assigned as is. The same happens if a component is misspelled, given in wrong order, or one of the required components is unspecified.
Furthermore, a style component may be specified case-independently. See Calendar option --translate-string=text, for further annotations how the style component is used correctly.
Next: Coding Scheme, Previous: Obsolete Special Texts, Up: Top [Contents][Index]