Skip to content

Commit

Permalink
FEATURE : Set the scheduled time from ical.
Browse files Browse the repository at this point in the history
  • Loading branch information
crdoconnor committed Jan 4, 2024
1 parent 9a3225a commit 9d3bc26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hitch/story/insert-ical.story
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Insert ical file:
contents: |
* Meetings
** Networld+Interop Conference
SCHEDULED: <2024-01-04 Thu 10:05-11:50>
SCHEDULED: <1996-07-04 Thu 12:00>
Networld+Interop Conference and Exhibit
Atlanta World Congress Center
Atlanta, Georgia
Expand Down
7 changes: 6 additions & 1 deletion orji/ical.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path
from orgmunge import ORG_TIME_FORMAT
import icalendar
import jinja2

Expand Down Expand Up @@ -26,7 +27,11 @@ def description(self):

@property
def scheduled(self):
return "2024-01-04 Thu 10:05-11:50"
return (
self._ievent.get("DTSTAMP")
.from_ical(self._ievent.get("DTSTAMP"))
.strftime(ORG_TIME_FORMAT)
)


class ICal:
Expand Down

0 comments on commit 9d3bc26

Please sign in to comment.