Thank you for the replies! I'm operating on a AIX environment.
Since the quarter syntax is whacky, what would you suggest instead? My thoughts are to still utilize the if/elif logic, but instead use month instead. While there would be more conditions using month, it seems safer.
As far as :
FirstQtrWeek : The script should determine if it it the first Saturday of the 1st quarter month. If so, set it. If not, it needs to refer to that week until the next quarter.
& LastQtrWeek,the script should determine if it is the 3rd quarter month of the current quarter, and then determine if it is the last Saturday.
I hope I explained that well enough?
---------- Post updated at 08:50 PM ---------- Previous update was at 08:06 PM ----------
Hey Guys.I am a newbie on Bash Shell Scripting and Perl.And I have a question about file parsing.
I have a log file which contains reports about a communication device.I need to take some of the reports from the log file.Its hard to explain the issue.but shortly I can say that, the reports has a... (2 Replies)
Any ideas?
1)loop through text file
2)extract everything between SOL and EOL
3)output files, for example: 123.txt and 124.txt for the file below
So far I have: sed -n "/SOL/,/EOL/{p;/EOL/q;}" file
Here is an example of my text file.
SOL-123.go
something goes here
something goes... (0 Replies)
I was trying to parse the text file, which will looks like this
###XYZABC####
############
int = 4
char = 1
float = 1
.
.
############
like this my text file will contains lots of entries and I need to store these entries in the map eg. map.first = int and map.second = 4 same way I... (5 Replies)
I'm totally stumped with how to handle this huge text file I'm trying to deal with. I really need some help!
Here is what is looks like:
ab1ba67c331a3d731396322fad8dd71a3b627f89359827697645c806091c40b9
0.2
812a3c3684310045f1cb3157bf5eebc4379804e98c82b56f3944564e7bf5dab5
0.6
0.6... (3 Replies)
Hi Friends,
I am back for the second round today - :D
My input text file is this way
Home
friends
friendship meter
Tools
Mirrors
Downloads
My Data
About Us
Help
My own results
BLAT Search Results
ACTIONS QUERY SCORE START END QSIZE IDENTITY CHRO STRAND ... (7 Replies)
I have a text file with records of the form:
A X1 Y1 X2 Y2 X3 Y3
where A is character length 10, Xi is character length 4 and Yi is numeric length 10.
I want to parse the line, and output records like:
A X1 Y1
A X2 Y2
A X3 Y3
etc
Can anyone please give me an idea of how to do this. ... (4 Replies)
Discussion started by: wvdeijk
4 Replies
LEARN ABOUT PHP
datetime.modify
DATETIME.MODIFY(3) 1 DATETIME.MODIFY(3)DateTime::modify - Alters the timestamp
Object oriented style
SYNOPSIS
public DateTime DateTime::modify (string $modify)
DESCRIPTION
Procedural style
DateTime date_modify (DateTime $object, string $modify)
Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime(3).
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $modify
-A date/time string. Valid formats are explained in Date and Time Formats.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.6 | |
| | |
| | Absolute date/time statements now take effect. |
| | Previously, only relative parts were used. |
| | |
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.modify(3) example
Object oriented style
<?php
$date = new DateTime('2006-12-12');
$date->modify('+1 day');
echo $date->format('Y-m-d');
?>
Procedural style
<?php
$date = date_create('2006-12-12');
date_modify($date, '+1 day');
echo date_format($date, 'Y-m-d');
?>
The above examples will output:
2006-12-13
Example #2
Beware when adding or subtracting months
<?php
$date = new DateTime('2000-12-31');
$date->modify('+1 month');
echo $date->format('Y-m-d') . "
";
$date->modify('+1 month');
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2001-01-31
2001-03-03
SEE ALSO strtotime(3), DateTime.add(3), DateTime.sub(3), DateTime.setDate(3), DateTime.setISODate(3), DateTime.setTime(3), DateTime.setTimes-
tamp(3).
PHP Documentation Group DATETIME.MODIFY(3)