如何将日期字段输出格式设置为“___ 天直到”使用 Drupal 7 日期和时间视图模块
我在自定义内容类型中有一个“截止日期”字段。
我正在使用视图来显示节点的输出及其各自的截止日期。但我希望截止日期是数字天数,即“109”,而不是“2011 年 12 月 8 日”。
使用日期模块,我很难理解如何解析我的结果,使其成为我想要的结果。有一个格式化程序“很久以前” - 但输出格式为“1周,还剩5天”。
我对令牌或内容样式知之甚少,但也许有答案。
任何使用视图“配置字段:字段:截止日期”的解决方案都将是干净且更可取的!
I have a "Deadline" field in a custom content type.
I am using views to display an output of my nodes and their respective deadlines. But I want the deadline to be a numeric days until, or "109", instead of "dec 8, 2011".
Using the Date module, I am having a hard time understanding how to parse my results such that they are how I want. There is a formatter "time ago" - but outputs in the style "1 week, 5 days to go"..
I know very little about tokens, or styling the content, but perhaps there is an answer in that.
Any solution which utilizes Views "Configure field: Field: Deadline" would be clean and preferable!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的意思是您希望截止日期字段的结果告诉您截止日期剩余的天数?
do you mean that you want the result of dead line field to tell you the number of days remaining to the deadline ?