compute_day_from_date {SticsRFiles}R Documentation

Convert date into day number

Description

Computes the day number corresponding to a given date (or vector of) with reference to a start date. Typically, the start date should be the date at which a STICS simulation will start. Leap years are properly handled.

Usage

compute_day_from_date(date, start_date)

Arguments

date

date vector you wish to convert, in the Date format

start_date

date used as the reference point, in the Date format, typically the simulation start year

Value

numeric vector

Author(s)

Timothee Flutre

Examples

start_date <- as.Date("2014-08-01")
date <- as.Date("2015-02-10")
compute_day_from_date(date=date, start_date=start_date)

start_date <- as.Date("2008-08-01")
date <- as.Date("2009-02-10")
compute_day_from_date(date=date, start_date=start_date)

[Package SticsRFiles version 1.3.0 Index]