Permalink
Browse files

Docstring updates

  • Loading branch information...
zachwill committed Mar 6, 2013
1 parent 8597a12 commit 1c4a1723c5910f60b53927deaa5ca9086be1cb25
Showing with 3 additions and 0 deletions.
  1. +3 −0 moment/core.py
View
@@ -21,11 +21,13 @@ def __init__(self, *args):
self._formula = formula
def now(self):
+ """Create a moment with the current datetime."""
self._date = datetime.now()
self._formula = "%Y-%m-%d"
return self
def utc(self, *args):
+ """Create a moment from a UTC date."""
date, formula = parse_date_and_formula(*args)
self._date = pytz.timezone('UTC').localize(date)
self._formula = formula
@@ -86,6 +88,7 @@ def strftime(self, formula):
return self._date.strftime(formula)
def diff(self, moment, measurement=None):
+ """Return the difference between moments."""
return self - moment
def done(self):

0 comments on commit 1c4a172

Please sign in to comment.