Is there a code snippet to input date the specific page was last edited?

Permalink
=) Thank you concrete5 community. <3

 
planist1 replied on at Permalink Reply
planist1
Source:http://www.concrete5.org/community/forums/usage/datetime-page-was-l...

Try this:
// Load Date Helper
$date = Loader::helper("date");
// You may need to define $c 
global $c; 
// Get Blocks in Main area foreach($c->getBlocks('Main') as $b) {
$bDate[$i] = $b->getBlockDateLastModified();
$i ++; 
}   
// Reverse Sort Date Array 
rsort( $bDate );   
//Echo Date and Time Page last Edited 
echo $date->getLocalDateTime($bDate[0],$mask = 'm-d-Y g:i:s');