Skip to content

Instantly share code, notes, and snippets.

@elchappo
Created December 2, 2012 11:10
Show Gist options
  • Select an option

  • Save elchappo/4188244 to your computer and use it in GitHub Desktop.

Select an option

Save elchappo/4188244 to your computer and use it in GitHub Desktop.
Generating W3C valid HTML5 <time> tags in PHP
<time datetime="<?php echo date('Y-m-d\Th:m:sO', strtotime($publishedDate)); ?>" ><?php echo date('l jS F Y', strtotime($publishedDate); ?></time>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment