added created.dow (day of week) to template
This commit is contained in:
@@ -50,7 +50,13 @@ class DateTimeFormatter:
|
||||
""" 2-digit day of the month """
|
||||
dd = f"{self.dt.strftime('%d')}"
|
||||
return dd
|
||||
|
||||
|
||||
@property
|
||||
def dow(self):
|
||||
""" Day of week as locale's name """
|
||||
dow = f"{self.dt.strftime('%A')}"
|
||||
return dow
|
||||
|
||||
@property
|
||||
def doy(self):
|
||||
""" Julian day of year starting from 001 """
|
||||
|
||||
@@ -839,6 +839,9 @@ class PhotoInfo:
|
||||
if lookup == "created.dd":
|
||||
return DateTimeFormatter(self.date).dd
|
||||
|
||||
if lookup == "created.dow":
|
||||
return DateTimeFormatter(self.date).dow
|
||||
|
||||
if lookup == "created.doy":
|
||||
return DateTimeFormatter(self.date).doy
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ TEMPLATE_SUBSTITUTIONS = {
|
||||
"{created.month}": "Month name in user's locale of the file creation time",
|
||||
"{created.mon}": "Month abbreviation in the user's locale of the file creation time",
|
||||
"{created.dd}": "2-digit day of the month (zero padded) of file creation time",
|
||||
"{created.dow}": "Day of week in user's locale of the file creation time",
|
||||
"{created.doy}": "3-digit day of year (e.g Julian day) of file creation time, starting from 1 (zero padded)",
|
||||
"{modified.date}": "Photo's modification date in ISO format, e.g. '2020-03-22'",
|
||||
"{modified.year}": "4-digit year of file modification time",
|
||||
|
||||
Reference in New Issue
Block a user