|
@@ -523,6 +523,7 @@ class Contents extends Base implements QueryInterface
|
|
|
}
|
|
|
|
|
|
$value['date'] = new Date($value['created']);
|
|
|
+ $value['dateM'] = new Date($value['modified']);
|
|
|
|
|
|
/** 生成日期 */
|
|
|
$value['year'] = $value['date']->year;
|
|
@@ -628,6 +629,16 @@ class Contents extends Base implements QueryInterface
|
|
|
{
|
|
|
echo $this->date->format(empty($format) ? $this->options->postDateFormat : $format);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 输出文章修改日期
|
|
|
+ *
|
|
|
+ * @param string|null $format 日期格式
|
|
|
+ */
|
|
|
+ public function dateM(?string $format = null)
|
|
|
+ {
|
|
|
+ echo $this->dateM->format(empty($format) ? $this->options->postDateFormat : $format);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 输出文章内容
|