Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

COBOL Programming :: RE: How to find the first monday of the week.

$
0
0
Author: enrico-sorichetti
Subject: Reply to: How to find the first monday of the week.
Posted: Mon Nov 28, 2016 8:28 pm (GMT 5.5)

Quote:
Here is a small rexx program to achieve what you want:

unfortunately it does NOT icon_cool.gif

it calculates the date of the monday of 5th week relative to the current week

as told before ...

given a year and a week number

the computation starts by finding out the date of the monday of the first week of the year
and according to the ISO numbering standard for the week
the first week of a year is the one which contains the thursday

and after that You can add 7 * week-number


see here for a discussion and a REXX snippet to convert dates to/from a ISO week representation

http://www.ibmmainframeforum.com/clist-rexx/topic3963.html?hilit=iso
_________________
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort icon_cool.gif


Viewing all articles
Browse latest Browse all 9405

Trending Articles