Skip to contents

Return the fixed date of the k-day on or before fixed date 'date'.

Usage

kday_on_or_before(k, date)

Arguments

k

the weekday; k=0 means Sunday, k=1 means Monday, and so on.

date

a fixed date, i.e. a number of (eventually partial) days since epoch

Value

a fixed day number

See also

Other cycles of days helpers: kday_after(), kday_before(), kday_nearest()

Examples

if (FALSE) {
kday_on_or_before(1, -61387)
}