The Romans did not count days in the month as a simple number, as we do, but backwards from one of three fixed points in the month: the Kalends, the Nones, and the Ides. The Kalends are always the first of the month. The Nones fell on the 7th day of the long months (March, May, Quinctilis, October), and the 5th of the others. (Note that this long-short distinction refers to their length in the republican calendar, not the later version.) Likewise, the Ides fell on the 15th if the month was long, and the 13th if the month was short. The day before the Kalends (or Nones or Ides) was called "pridie" (or 2) Kalends, the day before that 3, etc. Therefore, May 3rd would be the 5 Nones of May; March 17 = 16 Kalends of April, or as you would find it in a Latin text: a.d. xvi Kal. Apr.
; (a.d. = ante diem
Here's a general rule to convert to Roman day reckoning: first, find the nearest fixed point (Ides, Nones or Kalends) that comes on or after your day. If it falls on one of these days, you're done. Otherwise, take the day number on which that fixed point falls and add one. Since the Kalends is the first of the next month, treat it as the n+1 day of the month (where n is the total number of days in the month). Example: for March, before Nones use 8; Ides, use 16; Kalends use 33. Then subtract the day in question, and you have your backward count. For example, November 11 = a. d. iii Ides Nov.; May 4 = a.d. pridie Non. Mai.
To convert from Roman reckoning, take the same number from the Ides, Nones of Kalends and subtract the Roman day number. For example, a.d. x Kal. Sext. = 21 Sextilis.