Fixes issue where now date was given

This commit is contained in:
Manuel Ebert 2013-03-04 14:44:04 -08:00
parent 4a24d6e3d3
commit f14c7c4d5f

View file

@ -3,11 +3,12 @@
import re
import textwrap
from datetime import datetime
class Entry:
def __init__(self, journal, date=None, title="", body=""):
self.journal = journal # Reference to journal mainly to access it's config
self.date = date
self.date = date or datetime.now()
self.title = title.strip()
self.body = body.strip()
self.tags = self.parse_tags()
@ -79,4 +80,4 @@ class Entry:
title=self.title,
body=body,
space=space
)
)