Sponsored Content
Full Discussion: Get Day of Week from date
Operating Systems HP-UX Get Day of Week from date Post 302173487 by deepakwins on Thursday 6th of March 2008 08:07:48 PM
Old 03-06-2008
Can the same logic be rewriten into perl?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find Day of the Week from the given date (Perl)?

How to find the Day of the Week of the given Date using perl? If I have a date in YYY--MM-DD format, how to find the DOW? Based on that, I need to find the following sunday. Pls help. (5 Replies)
Discussion started by: deepakwins
5 Replies

2. Shell Programming and Scripting

Function to get day of week from YYYY-MM-DD date

Can't find out how to get the day of the week from a given date, anyone got a code snippet that could help please? Ta!! (4 Replies)
Discussion started by: couponmeup
4 Replies

3. UNIX for Dummies Questions & Answers

Day of the week from a string

Hi All, I need to know how to derive the day of the week by passing the value in following format: Feb 28 2010 The output I'm expecting is Sunday or Sun. I know, I can use the following code to get the day of the week. date +%a But I want to pass the value as a string. Please help... (11 Replies)
Discussion started by: shash
11 Replies

4. Shell Programming and Scripting

how to obtain date and day of the week from `date` command

Hi, does anybody know how to format `date` command correctly to return the day of the week? Thanks -A I work in ksh.... (1 Reply)
Discussion started by: aoussenko
1 Replies

5. Shell Programming and Scripting

Finding Day of the week from date

I have a problem of Finding Day of the week from date, but i need to do it within awk On SOLARIS Input:20101007(YYYYMMDD) Output:Thursday kindly provide suggestions. Thanks in advance (8 Replies)
Discussion started by: junaid.nehvi
8 Replies

6. Shell Programming and Scripting

How to add day of week at the end of each line that shows the date?

I have a file that looks like: file1: www_blank_com 20121008153552 www_blank_com 20121008162542 www_blank_com 20121009040540 www_blank_com 20121009041542 www_blank_com 20121010113548 www_blank_com 20121011113551 www_blank_com 20121012113542 I want the new file to show the day of... (3 Replies)
Discussion started by: castrojc
3 Replies

7. HP-UX

Find Day of Week

In HP-UX the date command does not have the "-d" switch like some other *nixes do. I'm working a simple script to tell me, given the day, month and year what day of the week that falls on. Assuming valid day, month and year input (I'd perform quality checks on the input separately, but not... (5 Replies)
Discussion started by: rwuerth
5 Replies

8. Shell Programming and Scripting

How to obtain a day of the week from the date?

I have a date in format YYYYMMDD, i need to get the day of the week from the given date. I am working in AIX system. ---------- Post updated at 09:59 AM ---------- Previous update was at 09:57 AM ---------- Tried to post sum of the thread's link from which i tried, but de rules didnt allow me... (9 Replies)
Discussion started by: baranisachin
9 Replies

9. Shell Programming and Scripting

How to get the consecutive last 10 week day date using UNIX ksh shell scripting?

Hi, i am writing a ksh shell script to check the last month end date whether it is falling in last 10 week day date, I am not sure How to use "Mr. Perderabo's date calculator", Could you Please let me know how to use to get my requirement, I tried my own script but duplicate week day and... (5 Replies)
Discussion started by: karthikram
5 Replies

10. Shell Programming and Scripting

Get the week's day

Hi All, I have the below requirement , if i give the week number for ex 41 i need to get the date for Monday and thursday for this given week. my expected output is 13/10/2014 (Monday's date) and 16/10/2014 (Thursday's date) I am using GNU LINUX . Pls help me with your thoughts. Thanks in... (7 Replies)
Discussion started by: mohanalakshmi
7 Replies
Set::Infinite::Basic(3pm)				User Contributed Perl Documentation				 Set::Infinite::Basic(3pm)

NAME
Set::Infinite::Basic - Sets of intervals 6 =head1 SYNOPSIS use Set::Infinite::Basic; $set = Set::Infinite::Basic->new(1,2); # [1..2] print $set->union(5,6); # [1..2],[5..6] DESCRIPTION
Set::Infinite::Basic is a Set Theory module for infinite sets. It works on reals, integers, and objects. This module does not support recurrences. Recurrences are implemented in Set::Infinite. METHODS
empty_set Creates an empty_set. If called from an existing set, the empty set inherits the "type" and "density" characteristics. universal_set Creates a set containing "all" possible elements. If called from an existing set, the universal set inherits the "type" and "density" characteristics. until Extends a set until another: 0,5,7 -> until 2,6,10 gives [0..2), [5..6), [7..10) Note: this function is still experimental. copy clone Makes a new object from the object's data. Mode functions: $set = $set->real; $set = $set->integer; Logic functions: $logic = $set->intersects($b); $logic = $set->contains($b); $logic = $set->is_null; # also called "is_empty" Set functions: $set = $set->union($b); $set = $set->intersection($b); $set = $set->complement; $set = $set->complement($b); # can also be called "minus" or "difference" $set = $set->simmetric_difference( $b ); $set = $set->span; result is (min .. max) Scalar functions: $i = $set->min; $i = $set->max; $i = $set->size; $i = $set->count; # number of spans Overloaded Perl functions: print sort, <=> Global functions: separators(@i) chooses the interval separators. default are [ ] ( ) '..' ','. INFINITY returns an 'Infinity' number. NEG_INFINITY returns a '-Infinity' number. iterate ( sub { } ) Iterates over a subroutine. Returns the union of partial results. first In scalar context returns the first interval of a set. In list context returns the first interval of a set, and the 'tail'. Works in unbounded sets type($i) chooses an object data type. default is none (a normal perl SCALAR). examples: type('Math::BigFloat'); type('Math::BigInt'); type('Set::Infinite::Date'); See notes on Set::Infinite::Date below. tolerance(0) defaults to real sets (default) tolerance(1) defaults to integer sets real defaults to real sets (default) integer defaults to integer sets Internal functions: $set->fixtype; $set->numeric; CAVEATS
$set = Set::Infinite->new(10,1); Will be interpreted as [1..10] $set = Set::Infinite->new(1,2,3,4); Will be interpreted as [1..2],[3..4] instead of [1,2,3,4]. You probably want ->new([1],[2],[3],[4]) instead, or maybe ->new(1,4) $set = Set::Infinite->new(1..3); Will be interpreted as [1..2],3 instead of [1,2,3]. You probably want ->new(1,3) instead. INTERNALS
The internal representation of a span is a hash: { a => start of span, b => end of span, open_begin => '0' the span starts in 'a' '1' the span starts after 'a' open_end => '0' the span ends in 'b' '1' the span ends before 'b' } For example, this set: [100..200),300,(400..infinity) is represented by the array of hashes: list => [ { a => 100, b => 200, open_begin => 0, open_end => 1 }, { a => 300, b => 300, open_begin => 0, open_end => 0 }, { a => 400, b => infinity, open_begin => 0, open_end => 1 }, ] The density of a set is stored in the "tolerance" variable: tolerance => 0; # the set is made of real numbers. tolerance => 1; # the set is made of integers. The "type" variable stores the class of objects that will be stored in the set. type => 'DateTime'; # this is a set of DateTime objects The infinity value is generated by Perl, when it finds a numerical overflow: $inf = 100**100**100; SEE ALSO
Set::Infinite AUTHOR
Flavio S. Glock <fglock@gmail.com> perl v5.10.0 2008-07-21 Set::Infinite::Basic(3pm)
All times are GMT -4. The time now is 06:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy