Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. In [1]: import datetime
  2.  
  3. In [2]: import locale
  4.  
  5. In [3]: locale.setlocale(locale.LC_ALL,'fr_FR')
  6. Out[3]: 'fr_FR'
  7.  
  8. In [4]: datetime.datetime(2015,7,1).strftime('%B')
  9. Out[4]: 'juillet'
  10.  
  11. In [5]: locale.setlocale(locale.LC_ALL,'en_US')
  12. Out[5]: 'en_US'
  13.  
  14. In [6]: datetime.datetime(2015,7,1).strftime('%B')
  15. Out[6]: 'July'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement