Advertisement
rfmonk

calendar_yeardays2calendar.py

Jan 22nd, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. import calendar
  5. import pprint
  6.  
  7. cal = calendar.Calendar(calendar.SUNDAY)
  8.  
  9. cal_data = cal.yeardays2calendar(2014, 3)
  10. print 'len(cal_data)        :', len(cal_data)
  11.  
  12. top_months = cal_data[0]
  13. print 'len(top_months)      :', len(top_months)
  14.  
  15. first_month = top_months[0]
  16. print 'len(first_month)     :', len(first_month)
  17.  
  18. print 'first_month:'
  19. pprint.pprint(first_month)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement