mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-27 19:25:26 +01:00
Apply *_format ini option to date/time types. For calibre_* columns passed in.
This commit is contained in:
parent
b962059e4c
commit
4069b1d15d
1 changed files with 3 additions and 0 deletions
|
|
@ -654,6 +654,9 @@ class Story(Configurable):
|
|||
value = value.strftime(self.getConfig(key+"_format","%Y-%m-%d %H:%M:%S"))
|
||||
if key in ("datePublished","dateUpdated"):
|
||||
value = value.strftime(self.getConfig(key+"_format","%Y-%m-%d"))
|
||||
if isinstance(value, (datetime.date, datetime.datetime, datetime.time)) and self.hasConfig(key+"_format"):
|
||||
# logger.info("DATE: %s"%key)
|
||||
value = value.strftime(self.getConfig(key+"_format"))
|
||||
|
||||
if key == "title" and (self.chapter_first or self.chapter_last) and self.getConfig("title_chapter_range_pattern"):
|
||||
first = self.chapter_first or "1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue