getFirstDayOfMonth: First day of a calendar month, as a day count

View source: R/time.R

getFirstDayOfMonthR Documentation

First day of a calendar month, as a day count

Description

The day count of the first day of month in year.

Usage

getFirstDayOfMonth(year, month)

getInDays_my(year, month)

Arguments

year, month

integer vectors, recycled against each other; month in 1..12.

Details

Used to pin a forced school-enrolment event to a chosen month. The engine works out when the event would otherwise fall, then moves it to the first day of the enrolment month.

getInDays_my() is an old alias of getFirstDayOfMonth(), should not be used anymore.

Value

integer vector of days since 1970-01-01 or NA where year or month is not a whole number, or month is not between 1 and 12.

Deprecated

getInDays_my() is deprecated as of MicSim 4.0.0 and will be removed in a future release. It still works, and shows a message once per R session naming its replacement, getFirstDayOfMonth(), which takes the same arguments. Set options(MicSim.show_deprecation = FALSE) to turn the message off.

See Also

getInDays(), getInDateFormat()

Examples

getFirstDayOfMonth(2020, 9)
getInDateFormat(getFirstDayOfMonth(2020, 9))   # 20200901

MicSim documentation built on Dec. 2, 2026, 1:09 a.m.