When giving a date field a different name than “date”, the saved value does not get stored as timestamp, which makes handling dates in the the templates very inconsistent.
date:
label: Date
type: date
<?= $page->date(); ?>
Outputs: 1527379200
date_custom:
label: Date
type: date
<?= $page->date_custom(); ?>
The value that is stored in a date field is the same as the one stored in a custom date field. But because the date method is a special method, it returns a Unix timestamp while a custom date field does not. To output a Unix timestamp from a custom date field, you can call the date method like this: