Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: How preparing the weekly shift roster led to a fascinating discovery...

by polettix (Vicar)
on Dec 15, 2007 at 15:22 UTC ( [id://657200]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How preparing the weekly shift roster led to a fascinating discovery...
in thread How preparing the weekly shift roster led to a fascinating discovery...

If you restrict to months different from february, all of them have at least 30 days and you can easily see that "having" days 1..7 always gives you all the days up to 30 (just write numbers 1..30 putting a newline every 7 of them). Restricting to months from march to december (which always present the same pattern, whatever year you consider after the transition from Julian to Gregorian calendars) you can quickly check that all days 1..7 are there for all days of week (it suffices to see it for only one of them, then that's only a matter of modulo-7 maths).

So the only one that remains tricky is 31, because not all months "support" it.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Io ho capito... ma tu che hai detto?
  • Comment on Re^3: How preparing the weekly shift roster led to a fascinating discovery...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://657200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-06-17 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.