我想根据帖子发布的日期计算未来的日期,并在帖子内容中使用它。
我可以通过以下方式回复发布后的日期:
echo the_date(\'Y-m-d\');
如何计算未来日期?我想根据帖子发布的日期计算未来的日期,并在帖子内容中使用它。
我可以通过以下方式回复发布后的日期:
echo the_date(\'Y-m-d\');
如何计算未来日期?try
$future_timestamp = strtotime(\'+1 week\', get_the_date(\'Y-m-d\'));
echo date(\'Y-m-d\', $future_timestamp);
or
$future_timestamp = get_the_date(\'U\') + (60 * 60 * 24 * 7);
echo date(\'Y-m-d\', $future_timestamp);
在我的多站点安装中,我可以通过get\\u blog\\u details和blog ID获取子博客的注册和上次更新的时间字符串:echo get_blog_details($blog_ID)->registered 好的,如何格式化生成的时间字符串:2011-09-28 00:20:34 谢谢