Bitrix Site Manager

CSite::GetDateFormat

string
CSite::GetDateFormat(
  string format_type = "FULL",
  mixed site_id = false
)

The method GetDateFormat returns the site date (time) format.

Parameters

Parameter Description
format_type Format type. The following values are possible:
  • FULL - both date and time;
  • SHORT - date only.
Optional. "FULL" by default.
site_id The site ID.
Optional. The current site ID is used by default.

See Also

Example



<?
// displays the current date in the format of the current site
echo date($DB->DateFormatToPHP(CSite::GetDateFormat("SHORT")), time());
?>