Skip to contents

Creates a duration period for the DORIS system in ISO-8601 format from inputting years, months, weeks, days, hours, minutes, and seconds

Usage

iso_8601(
  years = 0,
  months = 0,
  weeks = 0,
  days = 0,
  hours = 0,
  minutes = 0,
  seconds = 0
)

Arguments

years

Number of years in the duration (default = 0).

months

Number of months in the duration (default = 0).

weeks

Number of weeks in the duration (default = 0).

days

Number of days in the duration (default = 0).

hours

Number of hours in the duration (default = 0).

minutes

Number of minutes in the duration (default = 0).

seconds

Number of seconds in the duration (default = 0).

Value

A time duration formatted according to ISO-8601

Examples


#A duration with 24 years
iso_8601(years = 24)
#> [1] "P24Y0M0W0DT0H0M0S"

#A duration with 6 months, 2 weeks and 5 days
iso_8601(months = 6, weeks = 2, days = 5)
#> [1] "P0Y6M2W5DT0H0M0S"