setCorrectDate {KarsTS}R Documentation

setCorrectDate: verifies date entry and returns proper output

Description

This function is used inside the verifyDateEntry function, whic is used to verify if a date is correct. The function setCorrectDate verifies if the year, month, day, hour, minutes or seconds are correct. For example, the day has to be an integer between 1 and 31, the minutes and seconds must be integers between 0 an 59 etc.

Usage

setCorrectDate(x, type)

Arguments

x

The element to test

type

The type of element: year, month, day, hour, minute or second

Value

The element if it is valid; NA otherwise.

Author(s)

Marina Saez Andreu


[Package KarsTS version 2.4.1 Index]