6 More Discussions You Might Find Interesting
1. HP-UX
Hello Friends,
I bought HP-UX 9000 series server. They shipped it with HP-UX 11.31 March 2014 version operating system. But i want to reload it with HP ux 11i v3 september 2012.
I have only hardware support for this box, so i cant get it from HP site.
Can any tell me where can i download it.... (4 Replies)
Discussion started by: corequad
4 Replies
2. What is on Your Mind?
I have added two new sports events.
The FIFA Ballon d'Or is an association football award given annually to the player who is considered to have performed the best in the previous season. It is awarded based on votes by coaches and captains of international teams, as well as journalists from... (0 Replies)
Discussion started by: ni2
0 Replies
3. Shell Programming and Scripting
Hi I have a problem with Date format in my code.
1st I am trying to convert today's date to yesterday's using
YESTERDAY3=`perl -e '@y=localtime(time()-86400); printf "%04d/%02d/%02d",$y+1900,$y+1,$y;$y;'`
And once it is done I am trying to using the yesterday date in a grep command to... (3 Replies)
Discussion started by: nithinankam
3 Replies
4. What is on Your Mind?
For those of you watching Wimbledon you already know that Rafael Nadal will not be in the final.
There is an open event in the Event Prediction Forum. Place your bits on the guys left. This event closes on Sunday 8th July 2012. (0 Replies)
Discussion started by: ni2
0 Replies
5. Shell Programming and Scripting
I have a value in a file i am processing that has a date like "2012-Jun-13"
how can I convert a date like that 2012-06-13?
Am I stuck building an array of three digit months and corresponding numbers and running through the logic of figuring out the number??
or can I convert this with... (1 Reply)
Discussion started by: trey85stang
1 Replies
6. Shell Programming and Scripting
I need to be able to compare dates in the format of Jan 10, 2012 and Jan 10 2012. (Notice one has a comma).
Then I need to find the date that is 7 days before those dates if they are equal.
How can I do this in Bash.
Thank ahead (4 Replies)
Discussion started by: ojthejuice
4 Replies
LEARN ABOUT PHP
dateperiod.__construct
DATEPERIOD.__CONSTRUCT(3) 1 DATEPERIOD.__CONSTRUCT(3)
DatePeriod::__construct - Creates a new DatePeriod object
SYNOPSIS
public DatePeriod::__construct (DateTimeInterface $start, DateInterval $interval, int $recurrences, [int $options])
DESCRIPTION
DatePeriod::__construct (DateTimeInterface $start, DateInterval $interval, DateTimeInterface $end, [int $options]) DatePeriod::__con-
struct (string $isostr, [int $options])
Creates a new DatePeriod object.
PARAMETERS
o $start
- The start date of the period.
o $interval
- The interval between recurrences within the period.
o $recurrences
- The number of recurrences.
o $end
- The end date of the period.
o $isostr
- An ISO 8601 repeating interval specification.
o $options
- Can be set to DatePeriod::EXCLUDE_START_DATE to exclude the start date from the set of recurring dates within the period.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.5.8 | |
| | |
| | $end type changed to DateTimeImmutable. Previ- |
| | ously, DateTime. |
| | |
| 5.5.0 | |
| | |
| | $start type changed to DateTimeImmutable. Previ- |
| | ously, DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DatePeriod example
<?php
$start = new DateTime('2012-07-01');
$interval = new DateInterval('P7D');
$end = new DateTime('2012-07-31');
$recurrences = 4;
$iso = 'R4/2012-07-01T00:00:00Z/P7D';
// All of these periods are equivalent.
$period = new DatePeriod($start, $interval, $recurrences);
$period = new DatePeriod($start, $interval, $end);
$period = new DatePeriod($iso);
// By iterating over the DatePeriod object, all of the
// recurring dates within that period are printed.
foreach ($period as $date) {
echo $date->format('Y-m-d')."
";
}
?>
The above example will output:
2012-07-01
2012-07-08
2012-07-15
2012-07-22
2012-07-29
Example #2
DatePeriod example with DatePeriod::EXCLUDE_START_DATE
<?php
$start = new DateTime('2012-07-01');
$interval = new DateInterval('P7D');
$end = new DateTime('2012-07-31');
$period = new DatePeriod($start, $interval, $end,
DatePeriod::EXCLUDE_START_DATE);
// By iterating over the DatePeriod object, all of the
// recurring dates within that period are printed.
// Note that, in this case, 2012-07-01 is not printed.
foreach ($period as $date) {
echo $date->format('Y-m-d')."
";
}
?>
The above example will output:
2012-07-08
2012-07-15
2012-07-22
2012-07-29
PHP Documentation Group DATEPERIOD.__CONSTRUCT(3)