Sometimes it may be handy to display the creation or update date of the page. Webigniter has 2 methods to do so. These are getCreatedAt()
and getUpdatedAt()
.
These 2 methods allow you to get either the date of the creation of the page, or the date of the last modification. These 2 values are accessible in the view files.
To use (one of) these methods, you can do something like this in your view files.
This page is created at <?=$webigniter->getCreatedAt('M d, Y');?><br>
This page is last updated at : <?=$webigniter->getUpdatedAt('M d, Y');?>
This will show you both creation and last updated date. As you can see you can also specify a format. In this case ('M d, Y')
means mm dd, YYY. But you can have any format you like. It uses the php date() function, so these are the values you can use..