- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Next workday
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:01 AM
04-11-2005 04:01 AM
Does anyone have a way to get the next workday? If it's Monday through Thursday, I need the next day but if it's Friday, I need the next Monday?
Is there an easy solution?
Thanks,
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:04 AM
04-11-2005 04:04 AM
Re: Next workday
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:06 AM
04-11-2005 04:06 AM
Re: Next workday
NW_DAY=$(caljd.sh -S "/" $(caljd.sh -n 1 -x 6 -x 0 -h))
echo "Next workday = ${NW_DAY}"
This is pretty hard to beat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:13 AM
04-11-2005 04:13 AM
Re: Next workday
Now you can put some if statements to get next day.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:33 AM
04-11-2005 04:33 AM
Re: Next workday
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 04:40 AM
04-11-2005 04:40 AM
Re: Next workday
perl -e '$days=(1,1,1,1,1,3,2)[(localtime)[6]]; print scalar localtime(time+$days*86400),"\n"'
(localtime)[6] = weekday number (0..6) for now.
(1,1,1,1,1,3,2)[x] = Use as index into array with number of days to add.
multiply those days with 24*60*60=86400 seconds in a day.
Add to current time, format and print with newline.
Hein.