Sponsored Content
Top Forums Shell Programming and Scripting How to add decimal month to some month in sql, php, perl, bash, sh? Post 302904147 by RudiC on Monday 2nd of June 2014 11:19:52 AM
Old 06-02-2014
I'm afraid you're heading a bit off target: there's an uncertainty to a month's length of 10% (3 days in 30), and you want to calculate a date to 500 ppm (which is some 20 min), starting from a date that has an uncertainty of 24h to it (assuming midnight of the day indicated).
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Script : Split given month into weeks

I want to split a given month into weeks. For example if I give the date in dd/mm/yy format say 01/02/08 it should give output in the given format : week1 : start date and end date. week2 : "" week3 : "" week4 : "" (5 Replies)
Discussion started by: khushbu_roy
5 Replies

2. Shell Programming and Scripting

Isolating the Month in Perl

munt=`date '+%m` will isolate the month in digit form 02 = Feb Trying to get the same out of perl just cant see it $stimx = localtime($^T); print ((split/ /,$stimx)); (4 Replies)
Discussion started by: popeye
4 Replies

3. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

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

Script to counting a specific word in a logfile on each day of this month, last month etc

Hello All, I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer. Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies

5. Shell Programming and Scripting

perl : searching for month and storing the date and time in an array

I am writing the code in perl. I have an array in perl and each variable in the array contains the data in the below format Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Discussion started by: giridhar276
5 Replies

6. Shell Programming and Scripting

Convert From Month Number to Month Name

Hi, I have a script that accepts an input date from the user in yyyy-mm-dd format. I need to get the mm-dd part and convert it to month name. example: 2011-11-15 I want that to become "Nov 15" I don't have the GNU date, I am using an AIX os. Thanks. (1 Reply)
Discussion started by: erin00
1 Replies

7. Shell Programming and Scripting

Need last month files after 10th of every month

Hi, I need all file names in a folder which has date >= 10th of last month, Example : files in folder AUTO_F1_20140610.TXT BUTO_F1_20140616.TXT CUTO_F1_20140603.TXT FA_AUTO_06012014.TXT LA_AUTO_06112014.TXT MA_AUTO_06212014.TXT ZA_AUTO_06232014.TXT Output: AUTO_F1_20140610.TXT... (9 Replies)
Discussion started by: nani1984
9 Replies

8. UNIX for Advanced & Expert Users

To pass one month range in sql script

Hi Guys, i am having .sql script which inserts data from one table to another table based on date condition, i need to pass range on based on how many number of months, for e.g set timing on; whenever sqlerror exit failure; spool myscript.log append accept start_date... (7 Replies)
Discussion started by: rohit_shinez
7 Replies

9. Shell Programming and Scripting

Remove new line and convert Month to Decimal

# Sample input common-name www.test.com.au expiration Dec 21 01:00:31 2017 GMT common-name www.test1.com.au expiration Jan 19 04:41:03 2018 GMT # Desired Output # Field 1: Domain name # Field 2: Date/time converted to Austraian format DD/MM/YYYY and on the same line as Domain Name. #... (7 Replies)
Discussion started by: thangbom
7 Replies

10. Linux

Bash Display First Friday of the next month

Hello, I need to find the date of next first Friday of the month and set as a variable in a bash script ie - FIRSTFRIDAY=$(date -dfirst-friday +%d) I know date -dfirst-friday doesn't work, but unsure if I can use this / cal + awk or something else to find the right date of the... (7 Replies)
Discussion started by: summerdays
7 Replies
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)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy