FreeBSD/contrib/ntp/libntp/ntp_calendar.c
/*
 *---------------------------------------------------------------------
 * For a given RD, get the RD of the associated month start.
 *---------------------------------------------------------------------
 */
For a given RD, get the RD of the associated month start.
For a given RD get the RD of the associated month start .
int32_t
ntpcal_rd_to_mstart(
	int32_t rd
	)
{
	ntpcal_split split;
	int	     leaps;
	split = ntpcal_split_eradays(rd - 1, &leaps);
	split = ntpcal_split_yeardays(split.lo, leaps);
	return rd - split.lo;
}
int32_t ntpcal_rd_to_mstart ( int32_t rd ) { ntpcal_split split ; int leaps ; split = ntpcal_split_eradays ( rd - 1 , & leaps ) ; split = ntpcal_split_yeardays ( split . lo , leaps ) ; return rd - split . lo ; }
For a given RD, get the RD of the associated month start.
For a given RD get the RD of the associated month start .