$interval_spec
)
Creates a new DateInterval object.
Anonymous user / 3.239.3.196 Log In Register |
?
Wallet:
3.00
Daily Credits:
1.20 / 1.20
|
This is your credit balance. Even if you are an anonymous user, you are given some credits to spend. Every IP address has its own account and it is provided with free credits that can be used to pay for Online Domain Tools services. Moreover, credit balance is reset every day. This is why we call them Daily Credits. Registered users have higher Daily Credits amounts and can even increase them by purchasing subscriptions.
Besides Daily Credits, all accounts, including IP address accounts of anonymous users, have their credit Wallet. Wallet credits are not reset on a daily basis, but they are only spent when a user has not enough Daily Credits. Registered users can buy credits to their wallets. All IP address accounts are created with an initial Wallet balance of 3.00. Once IP address account spends credits from its Wallet, it can not be charged again. This should allow new users to try most of Online Domain Tools services without registration.
$interval_spec
)
Creates a new DateInterval object.
An interval specification.
The format starts with the letter P, for "period." Each duration period is represented by an integer value followed by a period designator. If the duration contains time elements, that portion of the specification is preceded by the letter T.
Period Designator | Description |
---|---|
Y | years |
M | months |
D | days |
W | weeks. These get converted into days, so can not be combined with D. |
H | hours |
M | minutes |
S | seconds |
Here are some simple examples. Two days is P2D. Two seconds is PT2S. Six years and five minutes is P6YT5M.
Note:
The unit types must be entered from the largest scale unit on the left to the smallest scale unit on the right. So years before months, months before days, days before minutes, etc. Thus one year and four days must be represented as P1Y4D, not P4D1Y.
The specification can also be represented as a date time. A sample of one year and four days would be P0001-00-04T00:00:00. But the values in this format can not exceed a given period's roll-over-point (e.g. 25 hours is invalid).
These formats are based on the » ISO 8601 duration specification.
Example #1 DateInterval example
<?php
$interval = new DateInterval('P2Y4DT6H8M');
var_dump($interval);
?>
The above example will output:
object(DateInterval)#1 (8) { ["y"]=> int(2) ["m"]=> int(0) ["d"]=> int(4) ["h"]=> int(6) ["i"]=> int(8) ["s"]=> int(0) ["invert"]=> int(0) ["days"]=> bool(false) }