That should work well but don’t forget to put
;
PHP doesn’t require the closing tag (it is assumed when the file ends). Not specifying the closing ?> helps prevent accidents like additional whitespace which will cause session initialization to fail ("headers already sent").
You could also combine it into 1 snippet
<?php
return date("jS")."$Separator".date("F")."$Separator".date("Y");
Then use
in your page with whatever separator you like.
BTW open the file you want to put the snippet in, then switch to the elements tab and just drag and drop the snippet into your page
Or to push it a bit further:
<?php
return "<span class='$colorDay'>".date("jS")."</span>".$Separator."<span class='$colorMonth'>".date("F")."</span>".$Separator."<span class='$colorYear'>".date("Y")."</span>";
Then use this snippet:
[[date? &Separator=`-` &colorDay=`color_day` &colorMonth=`color_month` &colorYear=`color_year`]]
What’s left is to setup a style for your colorclasses in your stylesheet.
.color_day{
color:#FF0000;
}
...etc
Or if you’d rather set the colors directly:
<?php
return "<span style='color:$colorDay'>".date("jS")."</span>".$Separator."<span style='color:$colorMonth'>".date("F")."</span>".$Separator."<span style='color:$colorYear'>".date("Y")."</span>";
and use this
[[date? &Separator=`-` &colorDay=`red` &colorMonth=`blue` &colorYear=`green`]]