WPDK
1.5.0
WordPress Development Kit
|
Static Public Member Functions | |
static | format ($date, $to= 'm/d/Y H:i') |
Format a date time. More... | |
static | expirationDate ($date, $duration, $duration_type) |
Return expiration timestamp date. More... | |
static | daysToDate ($date) |
Return the number of days to a expiration date. More... | |
static | timeNewLine ($datetime) |
static | isExpired ($exipration) |
Check if a date is expired. More... | |
static | isInRangeDatetime ($date_start, $date_expire, $format= 'YmdHis', $timestamp=false) |
Check for date range. More... | |
static | mySQLDate ($date) |
MySQL Date. More... | |
static | mySQLDateTime ($datetime) |
MySQL Date. More... | |
static | stripSecondsFromTime ($time) |
static | daysToWeekStart ($date, $first_day= 'monday') |
Days number. More... | |
static | beginningOfWeek ($date, $first_day= 'monday') |
static | compareDate () |
TO DO. More... | |
static | compareDatetime () |
TO DO. More... | |
static | formatFromFormat ($date, $deprecated= '', $to= 'm/d/Y H:i') |
Format a date time. More... | |
static | makeTimeFrom ($format, $date) |
Timestamp from format. More... | |
static | date2MySql ($date, $deprecated= '') |
Date for mySQL. More... | |
static | dateTime2MySql ($datetime, $deprecated= '') |
Date and time for mySQL. More... | |
Static Public Member Functions inherited from WPDKObject | |
static | __delta ($last_version, $old_version) |
Object delta compare for combine. More... | |
static | delta ($last_version, $old_version) |
static | __dump ($var, $monitor=false) |
Dump a variable. More... | |
Data Fields | |
const | MYSQL_DATE = 'Y-m-d' |
MySQL date format. More... | |
const | MYSQL_DATE_TIME = 'Y-m-d H:i:s' |
MySQL date time format. More... | |
$__version = '1.0.2' | |
Version. More... | |
Data Fields inherited from WPDKObject | |
$__version = '1.0.0' | |
The version number assigned to the class. More... | |
Additional Inherited Members | |
Public Member Functions inherited from WPDKObject | |
__className () | |
Returns the class object. More... | |
__parentClass () | |
Returns the class object for the receiver’s superclass. More... | |
__isClass ($class) | |
Brief. More... | |
__isSubclassOfClass ($class) | |
Return TRUE if the receiving class is a subclass of —or identical to— $class, otherwise FALSE. More... | |
This class is useful to convert date and date time from a lot of format. It was design for MySQL conversion and jQuery date and datetime picker manage.
Definition at line 14 of file wpdk-datetime.php.
|
static |
Returns number of days to start of this week.
string | $date | |
string | $first_day | Optional. Start from monday |
Definition at line 244 of file wpdk-datetime.php.
|
static |
TO DO.
Definition at line 256 of file wpdk-datetime.php.
|
static |
TO DO.
Definition at line 261 of file wpdk-datetime.php.
|
static |
Date for mySQL.
Return any date/time in simple mySQL date format: YYYY-MM-DD
string | $date | Date |
string | $deprecated | Optional. Deprecated and not used since 1.0.0.b2 |
Definition at line 332 of file wpdk-datetime.php.
|
static |
Date and time for mySQL.
Formatta una data e ora per essere inserita in mySQL, quindi in formato YYYY-MM-DD HH:MM:SS Return any date/time in simple mySQL date format: YYYY-MM-DD HH:MM:SS
string | $datetime | Date |
string | $deprecated | Optional. Deprecated and not used since 1.0.0.b2 |
Definition at line 353 of file wpdk-datetime.php.
|
static |
Return the number of days to a expiration date.
Return the days to a expiration date from now. Return the days to up ($date > now) or days expired ($date < now).
int | $date | A timestamp date |
Definition at line 88 of file wpdk-datetime.php.
|
static |
Days number.
Returns number of days to start of this week.
object | $date | Date object |
string | $first_day |
Definition at line 213 of file wpdk-datetime.php.
|
static |
Return expiration timestamp date.
Return a timestamp as sum from $date and $duration/$duration_type
string | $date | Start date in MySQL format as YYYY-MM-DD HH:MM:SS |
int | $duration | Duration |
string | $duration_type | Type as days , minutes , `months |
Definition at line 73 of file wpdk-datetime.php.
|
static |
Format a date time.
Format a date time in your custom own format. The source format is auto-detect.
string | $date | Source date string format |
string | $to | Optional. Destination/outout format, default m/d/Y H:i |
Definition at line 50 of file wpdk-datetime.php.
|
static |
Format a date time.
Format a date time. You can select a source format and destination format in order to return the right output for you.
string | $date | Source date string format |
string | $deprecated | Optional. Not used. |
string | $to | Destination/outout format, default m/d/Y H:i |
Definition at line 285 of file wpdk-datetime.php.
|
static |
Check if a date is expired.
Return TRUE if $expiration date is past
int | $exipration | Timestamp date to check |
Definition at line 116 of file wpdk-datetime.php.
|
static |
Check for date range.
Return TRUE if now (today) is between from two date.
string | int | $date_start | Start date in string or timestamp. |
string | int | $date_expire | Expire date in string or timestamp. |
string | $format | Date format for start and expire. |
bool | $timestamp | TRUE if the date are in timestamp format. |
Definition at line 133 of file wpdk-datetime.php.
|
static |
Timestamp from format.
Return a timestamp from a specific format of date
string | $format | Format |
string | $date | Date and time |
Definition at line 307 of file wpdk-datetime.php.
|
static |
MySQL Date.
Return a date in MySQL format YYYY-MM-DD
.
string | $date | A string date |
Definition at line 169 of file wpdk-datetime.php.
|
static |
MySQL Date.
Return a date and time in MySQL format YYYY-MM-DD HH:MM:SS
.
string | $datetime | A string date |
Definition at line 184 of file wpdk-datetime.php.
|
static |
Strip seconds from a date string (with time)
string | $time | Time in hh:mm:ss |
Definition at line 196 of file wpdk-datetime.php.
|
static |
Utility per porre l'orario su una nuova riga. Aggiunge un tag br nello spazio tra la data e l'ora
string | $datetime | Data e ora formattati in modo che lo spazio delimiti data e ora |
Definition at line 102 of file wpdk-datetime.php.
string $__version = '1.0.2' |
const MYSQL_DATE = 'Y-m-d' |
MySQL date format.
This is the standard MySQL date format
Definition at line 21 of file wpdk-datetime.php.
const MYSQL_DATE_TIME = 'Y-m-d H:i:s' |
MySQL date time format.
This is the standard MySQL date and time format
Definition at line 28 of file wpdk-datetime.php.