Commit be2d563 1 parent 688478c commit be2d563 Copy full SHA for be2d563
File tree 3 files changed +18
-6
lines changed
3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -265,11 +265,23 @@ private function interval_to_seconds(DateInterval $interval): int {
265
265
private function format_relative_date (): ?string {
266
266
$ usertimestamp = $ this ->get_user_date ($ this ->datetime ->getTimestamp ());
267
267
if ($ usertimestamp == $ this ->get_user_date ($ this ->clock ->now ()->getTimestamp ())) {
268
- $ format = get_string ('strftimerelativetoday ' , 'langconfig ' );
268
+ $ format = get_string (
269
+ 'timerelativetoday ' ,
270
+ 'calendar ' ,
271
+ get_string ('strftimedateshort ' , 'langconfig ' )
272
+ );
269
273
} else if ($ usertimestamp == $ this ->get_user_date (strtotime ('yesterday ' , $ this ->clock ->now ()->getTimestamp ()))) {
270
- $ format = get_string ('strftimerelativeyesterday ' , 'langconfig ' );
274
+ $ format = get_string (
275
+ 'timerelativeyesterday ' ,
276
+ 'calendar ' ,
277
+ get_string ('strftimedateshort ' , 'langconfig ' )
278
+ );
271
279
} else if ($ usertimestamp == $ this ->get_user_date (strtotime ('tomorrow ' , $ this ->clock ->now ()->getTimestamp ()))) {
272
- $ format = get_string ('strftimerelativetomorrow ' , 'langconfig ' );
280
+ $ format = get_string (
281
+ 'timerelativetomorrow ' ,
282
+ 'calendar ' ,
283
+ get_string ('strftimedateshort ' , 'langconfig ' )
284
+ );
273
285
} else {
274
286
return null ;
275
287
}
Original file line number Diff line number Diff line change 245
245
$ string ['subscriptionupdated ' ] = 'The \'{$a} \' calendar subscription has been updated ' ;
246
246
$ string ['sun ' ] = 'Sun ' ;
247
247
$ string ['sunday ' ] = 'Sunday ' ;
248
+ $ string ['timerelativetoday ' ] = 'Today, {$a} ' ;
249
+ $ string ['timerelativetomorrow ' ] = 'Tomorrow, {$a} ' ;
250
+ $ string ['timerelativeyesterday ' ] = 'Yesterday, {$a} ' ;
248
251
$ string ['thu ' ] = 'Thu ' ;
249
252
$ string ['thursday ' ] = 'Thursday ' ;
250
253
$ string ['timeformat_12 ' ] = '12-hour (am/pm) ' ;
Original file line number Diff line number Diff line change 189
189
$ string ['strftimemonthyear ' ] = '%B %Y ' ;
190
190
$ string ['strftimerecent ' ] = '%d %b, %H:%M ' ;
191
191
$ string ['strftimerecentfull ' ] = '%a, %d %b %Y, %I:%M %p ' ;
192
- $ string ['strftimerelativetoday ' ] = 'Today, %d %B ' ;
193
- $ string ['strftimerelativetomorrow ' ] = 'Tomorrow, %d %B ' ;
194
- $ string ['strftimerelativeyesterday ' ] = 'Yesterday, %d %B ' ;
195
192
$ string ['strftimetime ' ] = '%I:%M %p ' ;
196
193
$ string ['strftimetime12 ' ] = '%I:%M %p ' ;
197
194
$ string ['strftimetime24 ' ] = '%H:%M ' ;
You can’t perform that action at this time.
0 commit comments