Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Can we get every tuesday or monday's date for the current week Post 302506038 by jim mcnamara on Friday 18th of March 2011 10:21:01 AM
Old 03-18-2011
The answer was in UNIX. Give us:

The flavor of UNIX you are running - like:Linux, AIX, HPUX, Solaris
The shell you use: bash, ksh, tcsh, csh, etc
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting week number of the "Monday"

Hi Friends, Can you help me with this, I would like to get the week number of the "Monday", Say if we run on first week of november it should give me output as "05" and "10" i.e it says the monday falls on 5th week of october. If we run on the second week of november it should give me "01"... (8 Replies)
Discussion started by: sbasetty
8 Replies

2. UNIX for Dummies Questions & Answers

I wanted to get the date of the first monday of a month.

Hi, I need to display the date of the first monday of a month. Can any one please help me on this. Thanks in advance. (6 Replies)
Discussion started by: Sheethal
6 Replies

3. UNIX for Advanced & Expert Users

Extract Monday from given date

Hi I want to extract the date on Monday depending upon the user input for that week. For example if the input date is 20080528 then the output should be 20080526. If the input is 20080525 then it will be 20080519 i am working on IBM AIX Thanks (2 Replies)
Discussion started by: itsme_maverick
2 Replies

4. Shell Programming and Scripting

Get the date of monday when running from Friday to next Thursday

Hi, I have a requirement where I want to get the date of monday when I am running the script from previous Friday to the following Thursday. For example: When ever I run the script between 19thFeb2010(Friday) to 25th Feb 2010(Thursday), I should get the date of 22nd Feb 2010 in the format of... (5 Replies)
Discussion started by: fasiazhar_411
5 Replies

5. Shell Programming and Scripting

Date One Week Ago From Given Date, Not From Current Date

Hi all, I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date. So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies

6. Shell Programming and Scripting

Get Date of Previous and next Monday

Hi, I would like to know how to get Previous Monday and Next Monday from the current date.. thanks (5 Replies)
Discussion started by: balasubramani04
5 Replies

7. Shell Programming and Scripting

Can we get Tuesday's date of the current week in UNIX

Hi All, I have a requirement which would calculate the Tuesday's date of the current week in yyyymmdd format in unix shell script. Please help me out how could I do this . I appreciate your help Regards, raj (7 Replies)
Discussion started by: rajeevm
7 Replies

8. Shell Programming and Scripting

Obtain date for first Tuesday of every month

Hi , Please help me out to write a shell script to obtain the date of first tueday of every month. I am new to shell scripting. Appreciate your help Thanks. (7 Replies)
Discussion started by: prongs22
7 Replies
DateTime::Event::ICal(3pm)				User Contributed Perl Documentation				DateTime::Event::ICal(3pm)

NAME
DateTime::Event::ICal - Perl DateTime extension for computing rfc2445 recurrences. SYNOPSIS
use DateTime; use DateTime::Event::ICal; my $dt = DateTime->new( year => 2000, month => 6, day => 20, ); my $set = DateTime::Event::ICal->recur( dtstart => $dt, freq => 'daily', bymonth => [ 10, 12 ], byhour => [ 10 ] ); my $dt_next = $set->next( $dt ); my $dt_previous = $set->previous( $dt ); my $bool = $set->contains( $dt ); my @days = $set->as_list( start => $dt1, end => $dt2 ); my $iter = $set->iterator; while ( my $dt = $iter->next ) { print ' ', $dt->datetime; } DESCRIPTION
This module provides convenience methods that let you easily create "DateTime::Set" objects for rfc2445 style recurrences. USAGE
recur This method returns a "DateTime::Set" object representing the given recurrence. my $set = DateTime::Event::ICal->recur( %args ); This method takes parameters which correspond to the rule parts specified in section 4.3.10 of RFC 2445. Rather than rewrite that RFC here, you are encouraged to read that first if you want to understand what all these parameters represent. o dtstart A DateTime object, which is the start date. This datetime is not included in the recurrence, unless it satisfies the recurrence's rules. A set can thus be used for creating exclusion rules (rfc2445 "exrule"), which don't include "dtstart". o until A DateTime object which specifies the recurrence's end date. Can also be specified as "dtend". o count A positive number which indicate the total number of recurrences. Giving both a "count" and an "until" parameter is pointless, though it is currently allowed. o freq One of: "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly" See the "DateTime::Event::Recurrence" documentation for more details on what these mean. o interval The interval between recurrences. This is a multiplier for the value specified by "freq". It defaults to 1. So if you specify a "freq" of "yearly" and an "interval" of 3, that means a recurrence that occurs every three years. o wkst Week start day. This can be one of: "mo", "tu", "we", "th", "fr", "sa", "su". The default is monday ("mo"). Note: this parameter is not yet implemented o bysecond => [ list ], byminute => [ list ], byhour => [ list ] This should be one or more positive or numbers, specified as a scalar or array reference. Each number represents a second/minute/hour. See RFC 2445, section 4.3.10 for more details. o byday => [ list ] This should be a scalar or array reference containing days of the week, specified as "mo", "tu", "we", "th", "fr", "sa", "su" The day of week may have a prefix: "1tu", # the first tuesday of month or year "-2we" # the second to last wednesday of month or year See RFC 2445, section 4.3.10 for more details. o bymonthday => [ list ], byyearday => [ list ] A scalar or array reference containing positive or negative numbers, but not zero. For "bymonthday", the allowed ranges are -31 to -1. For "byyearday", the allowed ranges are -366 to -1, and 1 to 366. Day -1 is last day of month or year. See RFC 2445, section 4.3.10 for more details. o byweekno => [ list ] A scalar or array reference containing positive or negative numbers, but not zero. The allowed ranges are -53 to -1, and 1 to 53. The first week of year is week 1. The default week start day is monday. Week -1 is the last week of year. See RFC 2445, section 4.3.10 for more details. o bymonth => [ list ] A scalar or array reference containing positive or negative numbers, from -12 to -1 and 1 to 12. Month -1 is December. See RFC 2445, section 4.3.10 for more details. o bysetpos => [ list ] This can be either a scalar or an array reference of positive and negative numbers from -366 to -1, and 1 to 366. This parameter is used in conjuction with one of the other "by..." parameters. See RFC 2445, section 4.3.10 for more details. AUTHOR
Flavio Soibelmann Glock fglock@gmail.com CREDITS
The API was developed with help from the people in the datetime@perl.org list. COPYRIGHT
Copyright (c) 2003 Flavio Soibelmann Glock. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
datetime@perl.org mailing list DateTime Web page at http://datetime.perl.org/ DateTime DateTime::Event::Recurrence - simple rule-based recurrences DateTime::Format::ICal - can parse rfc2445 recurrences DateTime::Set - recurrences defined by callback subroutines DateTime::Event::Cron - recurrences defined by "cron" rules DateTime::SpanSet RFC2445 - Internet Calendaring and Scheduling Core Object Specification - http://www.ietf.org/rfc/rfc2445.txt perl v5.10.1 2009-11-30 DateTime::Event::ICal(3pm)
All times are GMT -4. The time now is 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy