![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl Script : Split given month into weeks | khushbu_roy | Shell Programming and Scripting | 5 | 02-22-2008 08:40 PM |
| how to check whether the given file is 5 weeks older than current date | risshanth | Shell Programming and Scripting | 1 | 10-29-2007 01:53 AM |
| find a date two weeks ago? | frustrated1 | Shell Programming and Scripting | 2 | 04-22-2006 07:33 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How many weeks in a year
Hi,
I search how i could do to find if a year (for example 2004, 1989, 2058) has 52 or 53 weeks... Have you a idea for me please???
__________________
AIX 5.2 C@stelior |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Navigate:
Our Home Page -> Answers to Frequently Asked Questions -> Yesterdays Date/Date Arithmetic and take a look at my datacalc routine. Try to compute the Modified Julian Date of February 29 of the year in question. If you succeed you have a leap year which has too many days to be only 52 weeks. A non-leap is 364 days which is exactly 7 * 52. In my mind such a year is always 52 weeks in length. But to determine if the year exactly comprises 52 weeks each starting with Sunday, compute the Day of the Week of Jan 1. If Jan 1 is a Sunday, the anwser is yes. |
||||
| Google The UNIX and Linux Forums |