mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 01:18:31 +02:00
Fixes issue where now date was given
This commit is contained in:
parent
4a24d6e3d3
commit
f14c7c4d5f
1 changed files with 3 additions and 2 deletions
|
@ -3,11 +3,12 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
class Entry:
|
class Entry:
|
||||||
def __init__(self, journal, date=None, title="", body=""):
|
def __init__(self, journal, date=None, title="", body=""):
|
||||||
self.journal = journal # Reference to journal mainly to access it's config
|
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.title = title.strip()
|
||||||
self.body = body.strip()
|
self.body = body.strip()
|
||||||
self.tags = self.parse_tags()
|
self.tags = self.parse_tags()
|
||||||
|
@ -79,4 +80,4 @@ class Entry:
|
||||||
title=self.title,
|
title=self.title,
|
||||||
body=body,
|
body=body,
|
||||||
space=space
|
space=space
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue