We were excited to see that this module now has a release version. I have started testing it on one of our department sites. I did notice an issue, though, when the date field has an end date, even if the end date is not set, the formatting is a bit scrambled (see the screenshot for the Date and time formatter on the left next to the AP Style Date formatter on the right in the Views preview).

For example, if the start date is September 16, 2016, at 6 (no end date), the AP Style Date formatter displays it as Sept. 26 to 6 p.m. - Sept. 26.

If the start date is September 29, 2016, from 5:30 to 7, the AP Style Date formatter displays it as Sept. 29 to 7 p.m. - Sept. 29.

The normal "Date and time" formatter has an option to display Both Start and End dates, Start date only, and End date only. It might be useful to retain that feature in the AP Style Date views formatter.

CommentFileSizeAuthor
ap-style-date-start-end.png201.17 KBnotmike
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

notmike created an issue. See original summary.

shelane’s picture

What type of date field is being used? Is it a date field as a date type or a system date such as post date? I ask because they're handled in two different ways.

notmike’s picture

@shelane The field in the Event content type I used for my testing is a Date field type. I have the field set to collect an end date, but end date is not required.

I did also test with a "Content: Post date" field in one of my Views (which, of course, doesn't have an option for an end date), and the date renders correctly.

  • shelane committed 5ae8a4c on 7.x-1.x
    Issue #2805265 by notmike: Views Formatter issue on date field with end...
shelane’s picture

Assigned: Unassigned » shelane
Status: Active » Fixed

I have fixed the issue with the end date time display.

I had not previously looked at the other options provided by the "Date and time" formatter. If you would like to see this as a feature in this module, please submit a new issue as a feature request and if you are able, submit a patch. I may find some time in the next few months to give that a look if a patch is not submitted to accomplish that.

notmike’s picture

@shelane Thank you for the quick fix. I tested the 1.1 release on the same site. It works as expected. I tested various combinations of dates.

I did notice that you display time then date, which is correct for AP Style.

I will make the feature request for the start/end/both selector that I had mentioned.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.