"DD.MM.YYYY" only.
It now supports three formats, called flavours:
"dmy": "DD.MM.YYYY" (default, identical to version 1.0.0)"iso": "YYYY-MM-DD""iso_basic": "YYYYMMDD"setFlavour() selects the flavour for the whole R session.
All functions then work on strings of that format. Calling setFlavour()
again with a different flavour in the same session gives a warning,
because two formats in one session usually indicate a mistake.
The old identifiers "LP" (= "dmy") and "VK" (= "iso") are still
accepted.flavour() returns the active flavour. It now returns "dmy" by default
(version 1.0.0 returned "LP").jahr(), monat(), tag(), dateDiff() and dateAddMonths() have a new
optional argument format that overrides the session flavour for a single
call.If setFlavour() is never called, the package works in the format
"DD.MM.YYYY" and returns the same results as version 1.0.0 for every valid
input (day, month and year in the format, years 1000 to 9998, whole months).
A test (tests/testthat/test-kompatibel-1.0.0.R) compares the results with
values produced by the version published on CRAN.
Version 1.0.0 answered invalid input with NA or with a malformed string.
Version 1.1.0 stops with an error message that names the argument, its class
and value, and the expected format.
NA is now an error. jahr(), monat(), tag(), dateDiff() and
dateAddMonths() no longer return NA for an NA, an empty string or a
string that is not a date; they signal an error. Code that relied on
NA being passed through (for example sapply() over a column with gaps)
needs to filter those values first or wrap the call in tryCatch().
The same applies to a call without arguments."DD.MM.YYYY") is an error.dateAddMonths() accepts whole months only (a number of length 1). A
fractional number of months, which gave results like "01.01.5.2000", is an
error.dateAddMonths() stops if the resulting year is outside 0 to 9999. Version
1.0.0 returned values such as "31.01.1000" for a result beyond the year 9999."01.01.0001" instead of "01.01.1"). For years from 1000
on nothing changes.setFlavour().format.Language field in DESCRIPTION is en-US. Error messages are unchanged."DD.MM.YYYY" with jahr(), monat(), tag(), dateDiff(),
dateAddMonths() and flavour().