File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function toFormattedDateString()
3939 *
4040 * @return string
4141 */
42- public function toFormattedDayDateString (): string
42+ public function toFormattedDayDateString ()
4343 {
4444 return $ this ->format ('l j F Y ' );
4545 }
@@ -68,6 +68,18 @@ public function toDateTimeString($unitPrecision = 'second')
6868 return $ this ->format ('Y/m/d ' . static ::getTimeFormatByPrecision ($ unitPrecision ));
6969 }
7070
71+ /**
72+ * Format the instance as a readable date and time
73+ *
74+ * @param string $unitPrecision
75+ *
76+ * @return string
77+ */
78+ public function toFormattedDateTimeString ($ unitPrecision = 'second ' )
79+ {
80+ return $ this ->format ('j F Y ' . static ::getTimeFormatByPrecision ($ unitPrecision ));
81+ }
82+
7183 /**
7284 * Return a format from H:i to H:i:s.u according to given unit precision.
7385 *
@@ -110,11 +122,23 @@ public function toDateTimeLocalString($unitPrecision = 'second')
110122 /**
111123 * Format the instance with day, date and time
112124 *
125+ * @param string $unitPrecision
126+ *
127+ * @return string
128+ */
129+ public function toDayDateTimeString ($ unitPrecision = 'second ' )
130+ {
131+ return $ this ->format ('l j F Y ' . static ::getTimeFormatByPrecision ($ unitPrecision ));
132+ }
133+
134+ /**
135+ * Format the instance with the year, and a readable month
136+ *
113137 * @return string
114138 */
115- public function toDayDateTimeString ()
139+ public function toFormattedMonthYearString ()
116140 {
117- return $ this ->format ('l j F Y g:i A ' );
141+ return $ this ->format ('F Y ' );
118142 }
119143
120144}
You can’t perform that action at this time.
0 commit comments