Skip to main content
Post Undeleted by Antonio Hernandez
Post Deleted by Antonio Hernandez
added 147 characters in body
Source Link

Here's a trick: create a new date format by navigating to Admin > Configuration > Regional and Language > Date and Time and clicking on the Formats tab (admin/config/regional/date-time/formats).

Set it to W (that's uppercase W), and it will give you week number, which you can use with any date.

That way you can include the date field directly in views, set the W filter and use the aggregation, filter, etc without any additional coding.

Here's a trick: create a new date format by navigating to Admin > Configuration > Regional and Language > Date and Time and clicking on the Formats tab (admin/config/regional/date-time/formats).

Set it to W (that's uppercase W), and it will give you week number, which you can use with any date.

Here's a trick: create a new date format by navigating to Admin > Configuration > Regional and Language > Date and Time and clicking on the Formats tab (admin/config/regional/date-time/formats).

Set it to W (that's uppercase W), and it will give you week number, which you can use with any date.

That way you can include the date field directly in views, set the W filter and use the aggregation, filter, etc without any additional coding.

Source Link

Here's a trick: create a new date format by navigating to Admin > Configuration > Regional and Language > Date and Time and clicking on the Formats tab (admin/config/regional/date-time/formats).

Set it to W (that's uppercase W), and it will give you week number, which you can use with any date.