Property | Type | Description | |
---|---|---|---|
$arrRange | array | Date range | |
$strDate | integer | Date string | |
$strFormat | string | Format string |
Method | Description | |
---|---|---|
__construct ( integer $strDate = null, string $strFormat = null ) | Set the object properties | |
__get ( string $strKey ) : mixed | null | Return an object property | |
floorToMinute ( integer $intTime = null ) : integer | Round a UNIX timestamp to the full minute | |
formatToJs ( string $strFormat ) : mixed | Convert a PHP format string into a JavaScript format string | |
getFormatFromRgxp ( string $strRgxp ) : string | Return a numeric format string depending on the regular expression name | |
getInputFormat ( string $strFormat = null ) : string | Return an input format string for a particular date (e.g. YYYY-MM-DD) | |
getNumericDateFormat ( ) : string | Return the numeric date format string | |
getNumericDatimFormat ( ) : string | Return the numeric datim format string | |
getNumericTimeFormat ( ) : string | Return the numeric time format string | |
getRegexp ( string $strFormat = null ) : string | Return a regular expression to check a date | |
getWeekBegin ( integer $intStartDay ) : integer | Return the begin of the week as timestamp | |
getWeekEnd ( integer $intStartDay ) : integer | Return the end of the week as timestamp | |
isNumericFormat ( string $strFormat ) : boolean | Check for a numeric date format | |
parse ( string $strFormat, integer $intTstamp = null ) : string | Parse a date format string and translate textual representations |
Method | Description | |
---|---|---|
createDateRanges ( ) | Create the date ranges | |
dateToUnix ( ) | Convert a date string into a Unix timestamp using the format string | |
resolveCustomModifiers ( string $strDate ) : string | Resolve the custom modifiers |
public __construct ( integer $strDate = null, string $strFormat = null ) | ||
$strDate | integer | An optional date string |
$strFormat | string | An optional format string |
protected dateToUnix ( ) |
public static floorToMinute ( integer $intTime = null ) : integer | ||
$intTime | integer | The timestamp |
return | integer | The rounded timestamp |
public static formatToJs ( string $strFormat ) : mixed | ||
$strFormat | string | The PHP format string |
return | mixed | The JavaScript format string |
public static getFormatFromRgxp ( string $strRgxp ) : string | ||
$strRgxp | string | The regular expression name |
return | string | The numeric format string |
public static getInputFormat ( string $strFormat = null ) : string | ||
$strFormat | string | An optional format string |
return | string | The input format string |
public static getNumericDateFormat ( ) : string | ||
return | string | The numeric date format string |
public static getNumericDatimFormat ( ) : string | ||
return | string | The numeric datim format string |
public static getNumericTimeFormat ( ) : string | ||
return | string | The numeric time format string |
public getWeekBegin ( integer $intStartDay ) : integer | ||
$intStartDay | integer | The week start day |
return | integer | The Unix timestamp |
public getWeekEnd ( integer $intStartDay ) : integer | ||
$intStartDay | integer | The week start day |
return | integer | The Unix timestamp |
public static isNumericFormat ( string $strFormat ) : boolean | ||
$strFormat | string | The PHP format string |
return | boolean | True if the date format is numeric |
protected static resolveCustomModifiers ( string $strDate ) : string | ||
$strDate | string | The date string |
return | string | The resolved date string |