datestr_format_full.fullcode: formatting date string

View source: R/calendar.R

datestr_format_full.fullcodeR Documentation

formatting date string

Description

unify valid format of date

Usage

datestr_format_full.fullcode(
  datestr,
  Date.beg = NULL,
  Date.end = NULL,
  strict = TRUE,
  use.range = TRUE,
  use.jpera = TRUE,
  use.exceldate = FALSE,
  exceldate.origin = as.Date("1904-01-01")
)

Arguments

datestr

target character or sequence of character.

Date.beg

potentially begin date; used for validation and estimation.

Date.end

potentially end date; used for validation and estimation.

strict

return NA if read datestr is out of Date.beg-Date.end range

use.range

Allow range date format

use.jpera

Allow Japanese era case (e.g., R2.4.5 or 令和3年4月11日).

use.exceldate

Allow to check the value which is originally excel date but occationally transformed to normal value.

exceldate.origin

Origin of excel date. In default, it is 1900-01-01 if the file is originally created on Windows and 1904-01-01 on Mac.

Value

transformed date string like "2021.03.04-2023.05.31"


hmito/hmRLib documentation built on March 13, 2024, 9:41 p.m.