pattern_ISO8601_time: Generate a regular expression for ISO 8601 times

View source: R/iso8601_regexp.R

pattern_ISO8601_timeR Documentation

Generate a regular expression for ISO 8601 times

Description

Fractional hours and minutes are not allowed in the generated regular expressions even though they are allowed in the ISO 8601 standard.

Usage

pattern_ISO8601_time(
  truncated = 0,
  allow_fractional_hours = FALSE,
  allow_fractional_minutes = FALSE,
  allow_fractional_seconds = TRUE,
  fractional_digits = Inf,
  pattern_decimal_mark = c("\\.", ","),
  timezone = NA,
  allow_leap_second = FALSE,
  require_T = NA,
  ...
)

Arguments

truncated

Should the date be allowed to be truncated? An integer indicating the highest required precision (0=second is required, 1=minute, and 2=hour). A value of 3 will allow an empty string to match.

allow_fractional_hours, allow_fractional_minutes

Not yet supported

allow_fractional_seconds

Should fractional seconds be allowed?

fractional_digits

How many digits are allowed in fractional time units? 0 indicates that they are not allowed, and Inf indicates any number are allowed)

pattern_decimal_mark

What regular expression patterns should be allowed for the decimal mark? Comma and period are both allowed in the standard and by default.

timezone

Should the timezone be optional (NA, default), required (TRUE), or omitted (FALSE)?

allow_leap_second

Should leap seconds (61 seconds in a minute) be allowed?

require_T

Require the "T" at the beginning of the time? TRUE, FALSE, or NA (optional)

...

Passed to pattern_ISO8601_timezone()

Details

Leap seconds occur at 23:59:60Z at the end of the month. Given timezone differences which could occur on different hours and at the end of any 15-minute point, allow_leap_seconds only makes a change to allow for 60 seconds in any minute.

See Also

Other ISO8601 patterns: pattern_ISO8601_any_datetime(), pattern_ISO8601_any_date(), pattern_ISO8601_calendar_datetime(), pattern_ISO8601_calendar_date(), pattern_ISO8601_calendar_year(), pattern_ISO8601_ordinal_datetime(), pattern_ISO8601_ordinal_date(), pattern_ISO8601_timezone(), pattern_ISO8601_week_datetime(), pattern_ISO8601_week_date()

Other Date management and conversion: dateany_to_date(), generate_dtc(), is_ISO8601_calendar_datetime(), is_ISO8601_calendar_date(), is_ISO8601_ordinal_datetime(), is_ISO8601_timezone(), is_ISO8601_time(), is_ISO8601_week_datetime(), make_dy(), pattern_ISO8601_any_datetime(), pattern_ISO8601_any_date(), pattern_ISO8601_calendar_datetime(), pattern_ISO8601_calendar_date(), pattern_ISO8601_calendar_year(), pattern_ISO8601_ordinal_datetime(), pattern_ISO8601_ordinal_date(), pattern_ISO8601_timezone(), pattern_ISO8601_week_datetime(), pattern_ISO8601_week_date(), sdtm_dtc_to_datetime(), sdtm_first_dose(), sdtm_time_actual()


billdenney/Rsdtm documentation built on Dec. 7, 2022, 2:11 a.m.