Returns a unix timestamp or formatted date string from the page's date field or any other field containing a parsable date.
By default the date method assumes that there's a date
field in the text file.
<time datetime="<?php echo $page->date('c') ?>">
<?php echo $page->date('d/m/Y') ?>
</time>
If you want to use the date method with a custom field, you can pass the name of the field as second parameter
<time datetime="<?php echo $page->date('c', 'createdAt') ?>">
<?php echo $page->date('d/m/Y', 'createdAt') ?>
</time>
By default the date method will return the Unix timestamp. You can use that to make date calculations or format dates with strftime.
<?php echo strftime('%d/%m/%Y', $page->date()) ?>
<?php echo strftime('%d/%m/%Y', $page->date(false, 'createdAt')) ?>