- Issue created by @mandclu
- Status changed to Needs review
6 months ago 5:05am 16 May 2024 - πΊπΈUnited States joewhitsitt Iowa
It might also be advisable to replace "11:59pm" with midnight, but open to discussion on this idea.
If you can point to a reference regarding this, I think this could be a opt-in option in addition.
- π¨π¦Canada mandclu
I don't have any indication that this is a genuine AP-approved recommendation. My mention of that was more because listing an event as 8pm to midnight will always show the date for the next day, where 11:59pm would. So in theory, this could allow for showing events that display as ending at midnight without showing an end date.
A different resolution would be reviving an old Smart Date issue about adding a setting for a "next day" threshold. For example, if you set this as 3am then events that end before 3am wouldn't show a day for the end.
- πΊπΈUnited States joewhitsitt Iowa
Oh gosh. I don't know how you deal with all of this date stuff. Thank you for the example. Should the string matches account for 12:00:00 as well and if an 11:59 p.m. option is allowed any number of seconds between 11:59:00 p.m. and 12:00:00 a.m.? Does this get complicated enough that a stored timestamp should be evaluated against instead of the markup string?
- π¨π¦Canada mandclu
The more I think about it, the more it makes sense to handle the date rollover in the upstream Smart Date issue.
- πΊπΈUnited States joewhitsitt Iowa
Taking a look at this and don't have an idea yet, but with a format like M. j, Y the code
str_replace([$month_full, $month_abbr . '.', $month_abbr]...
is causing things like Marchch and Sept.t. - Status changed to Needs work
6 months ago 9:48pm 16 May 2024 - π¨π¦Canada mandclu
Right, it ends up replacing twice if the period is present. It may be tricky to have it work both with and without the period in the pattern, but I'll give it a shot.
- Status changed to Needs review
6 months ago 10:08pm 16 May 2024 -
joewhitsitt β
committed 22718de1 on 1.0.x authored by
mandclu β
Issue #3446751 by mandclu: Replace times with words for noon, midnight;...
-
joewhitsitt β
committed 22718de1 on 1.0.x authored by
mandclu β
- πΊπΈUnited States joewhitsitt Iowa
Looks good. Thanks for the quick adjustments. If there is desire for the 11:59pm = midnight option, I suggest a follow up issue.
// @todo worry about handling other languages?
I think the primary focus of the AP Stylebook is English-language usage and style, but you can't quote me on that since I don't actually license a copy. Leaving in for now.
- Status changed to Fixed
6 months ago 10:37pm 16 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.