Hi Friends,
I'm doing on script which finds all the files with time stamp and makes them tar and zip, based on their respective month&year. for instance "mar-2004.tar.zip" will contain all the files which was created/accessed/modified on mar-2004. like this the entire filesystem should be taken... (1 Reply)
Dear All,
Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report.
to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
hello,
I have many files called day001, day002, day003 and I want to rename them by day20070101, day20070102, etc.
I need to do it for several years and leap years as well.
What is the best way to do it ?
Thank you. (1 Reply)
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (2 Replies)
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (16 Replies)
Hi All,
I find all files for same month and year
lets say there are following files in directory
-rwxr-xr-x 1 user userg 1596 Mar 19 2012 c.txt
-rwxr-xr-x 1 user userg 1596 Mar 21 2012 d.txt
-rwxr-xr-x 1 user userg 1596 Mar 22 2012 f.txt
-rwxr-xr-x 1... (8 Replies)
Hi All,
lets say there are following files in directory
-rwxr-xr-x 1 user userg 1596 Mar 19 2012 a.txt
-rwxr-xr-x 1 user userg 1596 Mar 19 2012 b.txt
-rwxr-xr-x 1 user userg 1596 Mar 22 2012 c.txt
-rwxr-xr-x 1 user userg 1596 Mar 24 2012 d.txt... (16 Replies)
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
LEARN ABOUT DEBIAN
html::calendarmonth::datetool
HTML::CalendarMonth::DateTool(3pm) User Contributed Perl Documentation HTML::CalendarMonth::DateTool(3pm)NAME
HTML::CalendarMonth::DateTool - Base class for determining which date package to use for calendrical calculations.
SYNOPSIS
my $date_tool = HTML::CalendarMonth::DateTool->new(
year => $YYYY_year,
month => $one_thru_12_month,
weeknum => $weeknum_mode,
historic => $historic_mode,
datetool => $specific_datetool_if_desired,
);
DESCRIPTION
This module attempts to utilize the best date calculation package available on the current system. For most contemporary dates this usually
ends up being the internal Time::Local package of perl. For more exotic dates, or when week number of the years are desired, other methods
are attempted including DateTime, Date::Calc, Date::Manip, and the linux/unix 'ncal' or 'cal' commands. Each of these has a specific
subclass of this module offering the same utility methods needed by HTML::CalendarMonth.
METHODS
new()
Constructor. Takes the following parameters:
year
Year of calendar in question (required). If you are rendering exotic dates (i.e. dates outside of 1970 to 2038) then something
besides Time::Local will be used for calendrical calculations.
month
Month of calendar in question (required). 1 through 12.
weeknum
Optional. When specified, will limit class excursions to those that are currently set up for week of year calculations.
historic
Optional. If the the ncal or cal commands are available, use one of them rather than other available date modules since these
utilities accurately handle some specific historical artifacts such as the transition from Julian to Gregorian.
datetool
Optional. Mostly for debugging, this option can be used to indicate a specific HTML::CalendarMonth::DateTool subclass for
instantiation. The value can be either the actual utility class, e.g., Date::Calc, or the name of the CalendarMonth handler leaf
class, e.g. DateCalc. Use 'ncal' or 'cal', respectively, for the wrappers around those commands.
There are number of methods automatically available:
month()
year()
weeknum()
historical()
datetool()
Accessors for the parameters provided to "new()" above.
dow1st()
Returns the day of week number for the 1st of the "year" and "month" specified during the call to "new()". Relies on the presence of
"dow1st_and_lastday()". Should be 0..6 starting with Sun.
lastday()
Returns the last day of the month for the "year" and "month" specified during the call to "new()". Relies on the presence of
"dow1st_and_lastday()".
Overridden methods
Subclasses of this module must provide at least the "day_epoch()" and "dow1st_and_lastday()" methods.
dow1st_and_lastday()
Required. Provides a list containing the day of the week of the first day of the month (0..6 starting with Sun) along with the last day
of the month.
day_epoch()
Optional unless interested in epoch values for wacky dates. For a given day, and optionally "month" and "year" if they are different
from those specified in "new()", provide the unix epoch in seconds for that day at midnight.
If the subclass is expected to provide week of year numbers, three more methods are necessary:
dow()
For a given day, and optionally "month" and "year" if they are different from those specified in "new()", provide the day of week
number. (1=Sunday, 7=Saturday).
add_days($days, $delta, $day, [$month], [$year])
For a given day, and optionally "month" and "year" if they are different from those specified in "new()", provide a list of year,
month, and day once "delta" days have been added.
week_of_year($day, [$month], [$year])
For a given day, and optionally "month" and "year" if they are different from those specified in "new()", provide a list with the week
number of the year along with the year. (some days of a particular year can end up belonging to the prior or following years).
AUTHOR
Matthew P. Sisk, <sisk@mojotoad.com>
COPYRIGHT
Copyright (c) 2010 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
SEE ALSO HTML::CalendarMonth(3), Time::Local(3), DateTime(3), Date::Calc(3), Date::Manip(3), cal(1)perl v5.12.4 2011-08-26 HTML::CalendarMonth::DateTool(3pm)