check_period_format: Check period string format

View source: R/parse_period.R

check_period_formatR Documentation

Check period string format

Description

Check if the format of the period is conform the specifications of VMM

Usage

check_period_format(period_string)

Arguments

period_string

input string according to format required by waterinfo: The period string is provided as P#Y#M#DT#H#M#S, with P defines 'Period', each # is an integer value and the codes define the number of... Y - years M - months D - days T required if information about sub-day resolution is present H - hours D - days M - minutes S - seconds Instead of D (days), the usage of W - weeks is possible as well Examples of valid period strings: P3D, P1Y, P1DT12H, PT6H, P1Y6M3DT4H20M30S.

Value

str period string itself if valid

Examples

check_period_format("P2DT6H") # period of 2 days and 6 hours
check_period_format("P3D") # period of 3 days

inbo/wateRinfo documentation built on July 12, 2022, 11:29 a.m.