$file->modified($format = false, $handler = null)

Returns the unix timestamp or a formatted date for when the file has been modified

  • $format (string)
    Date format
  • $handler (string)
    Formatting function (date or strftime)
  • return (integer | string)

Example

// unix timestamp
echo $page->file()->modified();

// formatted date
echo $page->file()->modified('d/m/Y');

// formatted date using strftime
echo $page->file()->modified('%d/%m/%Y', 'strftime');