Closed (won't fix)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2010 at 01:59 UTC
Updated:
4 Jan 2019 at 08:01 UTC
Jump to comment: Most recent
Comments
Comment #1
mitchell commentedIn 7.x, there is a whole new token structure. Please check how this issue may apply to 7.x and report back. New changes are going into that branch anyway.
Changing to support request for now until verifying changes are necessary.
Comment #2
klausiClosed since no further information has been provided. Reopen if still an issue.
Comment #3
bomarmonk commentedI'm reopening this, since I can't get my single date field (for a year) to show up formatted as a year (rules renders the date-entity and date_field token as an entire date string with a month, day and time, even though the field only collects the year).
Any way to have rules use the date field's proper format and content?
Comment #4
David Stosik commentedHi bomarmonk,
Can you please have a look to this patch? #1898828: Add actions to format dates and durations
By adding an action "convert data", if you try to convert a date to a string, then you will get formatting options, and then will be able to use the provided variable in following actions.
David
Comment #5
tr commentedAll the date tokens are available if you use the contributed Token module, which enhances core Drupal's support for token:
Note there will be a separate token for each date format that you have configured at
/admin/config/regional/date-time. Short/medium/long are built-in to Drupal. You have the choice of either defining a new format and using the token for that format, or using the "Custom" token and explicitly.So I don't see a need to add additional tokens just for use within Rules - all the Token module tokens are available for any date you have in Rules.