31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table 4.1: Token Overview<br />

token input output description<br />

d yes yes day with 1 or 2 digits<br />

dd yes yes day with 2 digits (possibly with leading zero)<br />

dth yes yes day as abbreviated english ordinal number (1st, 2nd,<br />

3rd, 4th, . . . )<br />

m yes yes month with 1 or 2 digits<br />

mm yes yes month with 2 digits (possibly with leading zero)<br />

M yes yes month name (when used in an input format this token<br />

must be followed by a single char c which does not belong<br />

to any month name, c is used to determine the end of<br />

the name. e.g.: ”d.M.yy”)<br />

M:l yes yes the first l characters of the month name (l must be a<br />

single digit)<br />

yy yes yes year with 2 digits (yy is considered to represent a year<br />

in [1950;2049])<br />

yyyy yes yes year with 4 digits<br />

[yy]yy yes yes input: year with 2 or 4 digits / output: same as yyyy<br />

w no yes calendar week (in the range [1;53]) (see get week( ) for<br />

details)<br />

diy no yes day in the year (in the range [1,366])<br />

dow no yes day of the week (1=Monday, . . . , 7=Sunday)<br />

DOW no yes name of the weekday<br />

DOW:l no yes the first l characters of the weekday name (l must be a<br />

single digit)<br />

”txt” yes yes matches/prints txt (txt must not contain a double quote)<br />

’txt’ yes yes matches/prints txt (txt must not contain a single quote)<br />

c yes yes matches/prints c (c /∈ {d, m, M, ?, ∗, ;})<br />

? yes no matches a single arbitrary character<br />

∗c yes no matches any sequence of characters ending with c<br />

; yes yes separates different formats, e.g. ”d.M.yy;dd.mm.yy”<br />

input: the first format that matches the input is used<br />

output: all but the first format is ignored<br />

delim:c yes no c serves as delimiter when reading input from<br />

streams (If this token is used, it must be the<br />

first in the format string.) When you use<br />

”delim:\n;d.M.yy\n;d.m.yyyy\n” as input format to<br />

read a date from a stream, everything until the<br />

first occurence of ”\n” is read and then the format<br />

”d.M.yy\n;d.m.yyyy\n” is applied.<br />

date :: format { user def fmt, US standard, german standard, colons, hyphens }<br />

<strong>The</strong> format US standard is an abbreviation for mm/dd/[yy]yy, the<br />

format german standard is the same as dd.mm.[yy]yy, the other formats<br />

are the same as the latter except that the periods are replaced<br />

by colons/hyphens.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!