Using Python, get the day of the current month as an integer
>>> import datetime
>>> datetime.datetime.today().day
Or the "old school" (lower overhead, if it matters) method...
import time
time.localtime(time.time())[2]
time.localtime() returns a tuple containing all of the elements of a timestamp.
from datetime import datetime
today = datetime.now()
today.day # this is a integer