01-27-2012
Thanks balajesuri
i am not looking in the perl.
Any help other than perl.
thanks -suri
---------- Post updated at 03:21 AM ---------- Previous update was at 03:14 AM ----------
Thanks balajesuri
i am not looking in the perl.
Any help other than perl.
thanks -suri
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i want to delete files that are one day old
condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)}
any modifications to
find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)
Discussion started by: maverick
4 Replies
2. Shell Programming and Scripting
Hi All,
I want to find the time diffrence between currnt time and "abc.txt" file create time.
I have solve that but if the abc.txt file created last month then is there any process to find the difftent?
Exp:
Create time of abc.txt is "Apr 14 06:48"
and currect date is "May 17 23:47".... (1 Reply)
Discussion started by: priyankak
1 Replies
3. UNIX for Dummies Questions & Answers
Hi folks
month=`date +%m`gives current month
Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies
4. Shell Programming and Scripting
Hi Gurus,
I'm using HP-UX B.11.23 operating system.
I've been trying to extract this log info based on the current date and month, but was having some issues as the date column which on the 4th column has a comma and the 5th column has a dot tied to it.
Here is the output from my shut... (5 Replies)
Discussion started by: superHonda123
5 Replies
5. AIX
How could we derive teh Next month in MON-RR format from current date ie sysdate in UNI AIX sheel script.I coould get a command but i supports only inLinux susse andnotin AIX.
I need for Unix AIX.Pls Help.
Regards
Shiv (2 Replies)
Discussion started by: SHIV75
2 Replies
6. Shell Programming and Scripting
I have requirment to get last date of previous month and the first date of previous 4th month:
Example:
Current date: 20130320 (yyyymmdd)
Last date of previous month: 20130228 (yyyymmdd)
First date of previous 4th month: 20121101 (yyyymmdd)
In my shell --date, -d, -v switches are not... (3 Replies)
Discussion started by: machomaddy
3 Replies
7. Shell Programming and Scripting
I have a homework assignment:
----------------------------------------
"Display" the number of days in the current month. For example:
September 1996 has 30 days
----------------------------------------
I am trying to just display the head of cal to start the sentence.
eg. cal | head
... (1 Reply)
Discussion started by: eaafuddy
1 Replies
8. AIX
As said in object, how can i obtain that?
In linux i use date -d "1 month" +"%m%Y".
Thanks i advance. (8 Replies)
Discussion started by: fabfisc
8 Replies
9. Homework & Coursework Questions
I am running a script in ksh to get the 2 months back date from system date.The below code is giving correct date output from putty command prompt.But while running the script is .ksh file it is giving the error below.Please suggest.
; d=a; y=a
m-=num
while(m < 1) {m+=12; y--}... (1 Reply)
Discussion started by: hini
1 Replies
10. UNIX for Beginners Questions & Answers
Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal.
sample code:
export DT=$(date --date='6 days... (2 Replies)
Discussion started by: Rocky975583
2 Replies
LEARN ABOUT DEBIAN
data::faker::datetime
Data::Faker::DateTime(3pm) User Contributed Perl Documentation Data::Faker::DateTime(3pm)
NAME
Data::Faker::DateTime - Data::Faker plugin
SYNOPSIS AND USAGE
See Data::Faker
DATA PROVIDERS
unixtime
Return a unix time (seconds since the epoch) for a random time between the epoch and now.
date
Return a random date as a string, using a random date format (see date_format).
time
Return a random time as a string, using a random time format (see time_format).
rfc822
Return an RFC 822 formatted random date. This method may not work on systems using a non-GNU strftime implementation (kindly let me
know if that is the case.)
ampm
Returns am or pm randomly (in the current locale) using one of the formats specified in ampm_format.
time_format
Return a random time format.
date_format
Return a random date format.
ampm_format
Return a random am/pm format.
datetime_format
Return a random date and time format.
month
Return a random month name, unabbreviated, in the current locale.
month_abbr
Return a random month name, abbreviated, in the current locale.
weekday
Return a random weekday name, unabbreviated, in the current locale.
weekday_abbr
Return a random weekday name, abbreviated, in the current locale.
sqldate
Return a random date in the ISO8601 format commonly used by SQL servers (YYYY-MM-DD).
datetime_locale
Return a datetime string in the preferred date representation for the current locale, for a random date.
date_locale
Return a date string in the preferred date representation for the current locale, for a random date.
time_locale
Return a time string in the preferred date representation for the current locale, for a random date.
century
Return a random century number.
dayofmonth
Return a random day of the month.
UTILITY METHODS
Data::Faker::DateTime::timestr($format);
Given a strftime format specifier, this method passes it through to POSIX::strftime along with a random date to display in that format.
Perl passes this through to the strftime function of your system library, so it is possible that some of the formatting tokens used
here will not work on your system.
NOTES AND CAVEATS
Be careful build timestamps from pieces
Be very careful about building date/time representations in formats that are not already listed here. For example if you wanted to get
a date that consists of just the month and day, you should NOT do this:
my $faker = Data::Faker->new();
print join(' ',$faker->month,$faker->dayofmonth)."
";
This is bad because you might end up with 'February 31' for example. Instead you should use the timestr utility function to provide
you a formatted time for a valid date, or better still, write a plugin function that does it:
my $faker = Data::Faker->new();
print $faker->my_short_date()."
";
package Data::Faker::MyExtras;
use base qw(Data::Faker);
use Data::Faker::DateTime;
__PACKAGE__->register_plugin(
my_short_date => sub { Data::Faker::DateTime::timestr('%M %e') },
);
POSIX::strftime
See the documentation above regarding the timestr utility method for some caveats related to strftime and your system library.
SEE ALSO
Data::Faker
AUTHOR
Jason Kohles, <email@jasonkohles.com>
COPYRIGHT AND LICENSE
Copyright 2004-2005 by Jason Kohles
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2005-07-14 Data::Faker::DateTime(3pm)