The dayOfCommonEra() function returns the day number since the beginning of the common era (Jan. 1, 1 AD). This function can be passed a date value as a parameter, or will return the day of the common era for the current date if no parameter is supplied.