- Issue created by @NicholasS
- Merge request !98First shot at breaking down the date part and wraping each in a span tag so designers can theme. β (Open) created by NicholasS
- πΊπΈUnited States NicholasS
My First attempt here explodes on ' ' spaces, wraps them based on the original format, and re assembles. So you get markup like
<span class="smart-date--date"><span class="part-d,">Thu,</span> <span class="part-m">Mar</span> <span class="part-j">28</span> <span class="part-y">2024</span></span>
The limitation here is that there has to be spaces, I think in most languages there are, but not sure if there is a more clever way of doing this, but it accomplishes what we need in terms of adding tags so that we can accomplish better designs.
Bug possibilities: if any of the PHP date formats had spaces it would cause issues, looks like "r" https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.form... is the only one so I generally think this would work for all the different formats.
- π¨π¦Canada mandclu
This strikes me as more markup than most sites would need, so I'm not likely to merge this in. Maybe you could implement this as a Date Augmenter β ?
- πΊπΈUnited States NicholasS
This is behind the same toggle that https://www.drupal.org/project/smart_date/issues/3174063 β so people would have to opt in to adding this markup if that helps. I put it here as a patch in the interest of sharing code.
But yeah we have Date Augmenter installed don't really know how to use that module, but ran across that other issue when trying to theme our smart date which is why I went this route.
You can leave it unmerged if you want I will just keep the patch here so it can be applied to our site.