Facebook
From Walloping Bat, 3 Years ago, written in Python.
Embed
Download Paste or View Raw
Hits: 44
  1.     def this_month(cls):
  2.         until = cls._bod(cls.now())
  3.         until = until.month + 1
  4.         until = cls._bod(cls.now()).replace(month=until) - datetime.timedelta(days=1)
  5.         time = {'since': cls._bod(cls.now()),
  6.                 'until': until}
  7.  
  8.         return time