Since PHP 5.1.1, the Date constants are defined to standardize the date representation which can be used along with the date format functions. The Date constants specify a format returned by functions date_sunrise() and date_sunset().

The list of predefined date and time constants:

  • SUNFUNC_RET_TIMESTAMP(int)  - Timestamp
  • SUNFUNC_RET_STRING(int)  - sets Hours:Minutes)
  • SUNFUNC_RET_DOUBLE(int) - sets floating Hours.Minutes)

 

›› go to examples ››