create_version_number: Create version number

View source: R/create_version_number.R

create_version_numberR Documentation

Create version number

Description

Creates a version number from either a date and a version or a date and major and patch or major minor patch. If no parameters are supplied a default version is returned 0.1.0 This function prioritizes download date and version over all other parameters

Usage

create_version_number(
  download_date = NULL,
  version = NULL,
  major = 0,
  minor = "1",
  patch = 0
)

Arguments

download_date

(Optional) download_date This can either be a date or datetime but must include the full year e.g from Sys.Date() 2020-01-01 Or from Sys.time() 2020-01-01 00:00:00 BST note: also accepts / delimited dates e.g 01/02/2020 or 2020/01/01 and accepts date without delimiters but assumes ddmmyyyy or yyyymmdd e.g. 20200201

version

version number using major.minor.patch numbering e.g. 0.1.0 or major.patch e.g. 0.0

major

major number if not using version

minor

minor number if not using date

patch

patch number if not using version

Value

returns a character vector in the format of major.minor.patch e.g. 0.20200101.0


FAIRDataPipeline/rFDP documentation built on Oct. 14, 2024, 10:39 p.m.