Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

showdate

This function will format the date and time accordingly to the site and user offset. You can either use the standard formats for PHPFusion like shortdate, longdate, forumdate and newsdate, or your own.

showdate

Quote

showdate ( string $format, int $val )


Parameters
format
Format to show the date as, PHPFusion has some built in presets such as longdate, shortdate, forumdate or use your own

val
Unix timestamp

Return Values
Returns a string formatted according to the given format string using the given format. Month and weekday names and other language dependent strings respect the current locale set.


Examples
Code
<?php
// Time used in forum
echo showdate("forumdate", time());
 
// Short date
echo showdate("shortdate", time());
?>


showdate() custom example
Code
<?php
echo showdate("%m/%d/%y", time());
?>

Outputs : month/day/year

Changelog
7.01.02 - Introduced new server offset.
7.01.00 - Added "newsdate" to the accepted date formats