Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Determining if I have a particular Friday off

by RedElk (Hermit)
on Oct 25, 2012 at 14:16 UTC ( #1000878=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Determining if I have a particular Friday off
in thread Determining if I have a particular Friday off

Yeah, I concur. But, FWIW it was easy to extend for a minimal forecast:


#! usr/local/bin/perl # rdo.pl use strict; use warnings; print +(localtime)[7] / 7 % 2 ? "This Friday: Work\n" : "This Friday: +Free\n"; print +(localtime)[7] +1 / 7 % 2 ? "Next Friday: Work\n" : "Next Frida +y: Free\n"; print +((localtime)[7] +2) / 7 % 2 ? "Friday the week after: Work\n" : + "Friday the week after: Free\n";


Comment on Re^4: Determining if I have a particular Friday off
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-09-17 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (56 votes), past polls