Add a duration to the date.
You can specify the duration in a jDuration object or give each value of the duration.
void
add
(jDuration/int $year, int $month, int $day, int $hour, int $minute, int $second)
-
jDuration/int
$year: the duration value or a year with 4 digits
-
int
$month: month with 2 digits
-
int
$day: day with 2 digits
-
int
$hour: hour with 2 digits
-
int
$minute: minute with 2 digits
-
int
$second: second with 2 digits
jDateTime
__construct
( $year, $month, $day, $hour, $minute, $second)
-
$year
-
$month
-
$day
-
$hour
-
$minute
-
$second
to know the duration between two dates.
-
jDateTime
$dt: the date on which a sub will be made with the date on the current object
-
bool
$absolute
Check if jDateTime is "null" (all values egals to 0)
boolean
isNull
()
set date to current datetime
void
now
()
read a string to extract date values
void
setFromString
(string $str, [int $format = -1])
-
string
$str: the string date
-
int
$format: one of the class constant xxx_FORMAT, or -1 if it should use the default format
substract a duration to the date You can specify the duration in a jDuration object or give each value of the duration.
void
sub
(jDuration/int $year, int $month, int $day, int $hour, int $minute, int $second)
-
jDuration/int
$year: the duration value or a year with 4 digits
-
int
$month: month with 2 digits
-
int
$day: day with 2 digits
-
int
$hour: hour with 2 digits
-
int
$minute: minute with 2 digits
-
int
$second: second with 2 digits
Substract a date with another
convert the date to a string format
string
toString
([int $format = -1])
-
int
$format: one of the class constant xxx_FORMAT, or -1 if it should use the default format