mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
Implement datetime handling in pytest-bdd
- This was awful and convoluted Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
parent
cda07bf8d9
commit
4aabb73847
16 changed files with 133 additions and 87 deletions
|
@ -2,7 +2,7 @@
|
|||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
||||
from datetime import datetime
|
||||
import datetime
|
||||
import re
|
||||
|
||||
import ansiwrap
|
||||
|
@ -14,7 +14,7 @@ from .color import highlight_tags_with_background_color
|
|||
class Entry:
|
||||
def __init__(self, journal, date=None, text="", starred=False):
|
||||
self.journal = journal # Reference to journal mainly to access its config
|
||||
self.date = date or datetime.now()
|
||||
self.date = date or datetime.datetime.now()
|
||||
self.text = text
|
||||
self._title = None
|
||||
self._body = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue