date()

The date() function is a shorthand method of instantiating a new Date Object. It also allows you to use dates within Output tags e.g.


    {{ date() }} // 27 Jun 2017
    
    {{ date('tomorrow') }} // 28 Jun 2017
    
    {{ date().year }} // 2017
    
    {{ date().time }} // 13:24

This in turn means that the date object can be instantiated for limited use from within an editable region in the CMS.

The arguments accepted for the date() function are the same as those for the Date Object's construct.