- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Company holidays?
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
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
08-30-2007 03:56 AM
08-30-2007 03:56 AM
Is there a file or a table that stores company holidays on the system? If so how do you update it?
Thanks
Steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 04:00 AM
08-30-2007 04:00 AM
Re: Company holidays?
(the question is more than unclear to me ...)
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 04:02 AM
08-30-2007 04:02 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 04:07 AM
08-30-2007 04:07 AM
Re: Company holidays?
# more /etc/acct/holidays
* Prime/Nonprime Table for HP-UX Accounting System
*
* Curr Prime Non-Prime
* Year Start Start
*
1998 0800 1700
*
* Day of Calendar Company
* Year Date Holiday
*
1 Jan 1 New Year's Day
47 Feb 16 Presidents' Day
100 Apr 10 Spring Holiday
145 May 25 Memorial Day
184 Jul 3 Independence Day
250 Sep 7 Labor Day
330 Nov 26 Thanksgiving Day
331 Nov 27 Day after Thanksgiving
359 Dec 25 Christmas
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 04:24 AM
08-30-2007 04:24 AM
Re: Company holidays?
1) Determine Julian Day of 12/31/Current_year - 1
$ caljd.sh 12 31 2006
2454101
2) Determine Julian Day of Xmas, 2007
$ caljd.sh 12 25 2007
2454460
3) Subtract 2) from 1) to get the offset for the holidays entry:
echo $(( 2454460 - 2454101))
359
My latest version of caljd.sh is Vrsn 2.23 s. You should have no trouble finding it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 05:01 AM
08-30-2007 05:01 AM
Re: Company holidays?
We also use the /etc/acct/hoilday files as Torsten does.
more holidays.2007
* Prime/Nonprime Table for HP-UX Accounting System
*
* Curr Prime Non-Prime
* Year Start Start
*
2007 0730 1600
*
* Day of Calendar Company
* Year Date Holiday
*
1 Jan 1 New Years Day
15 Jan 15 Martin Luther King Day
50 Feb 19 President's Day
148 May 28 Memorial Day
185 Jul 4 Independence Day
246 Sep 3 Labor Day
281 Oct 8 Columbus Day
316 Nov 12 Veterans Day
326 Nov 22 Thanksgiving
359 Dec 25 Christmas
Sp,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:04 AM
08-30-2007 07:04 AM
Re: Company holidays?
I'll assign points to everyone later.
Thanks
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:29 AM
08-30-2007 07:29 AM
Re: Company holidays?
if [[ $(caljd.sh -n 1) != $(caljd.sh -n 1 -h) ]]
then
echo "Tomorrow is a holiday!!!"
else
echo "It ain't."
fi
Now, /etc/acct/holidays only works on the current year so consider what might happen over a year boundary --- and 01-January is a common holiday. To deal with this problem, caljd.sh, uses this convention, it first looks for the file holidays_YYYY before holidays. On my systems, I symbolically link /etc/acct/holidays_2007 (or whatever is the current year) to /etc/acct/holidays.
Attached is the latest caljd.sh version, 2.3 s. Invode as caljd.sh -u for full usage and many examples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:34 AM
08-30-2007 07:34 AM
Re: Company holidays?
if [[ $(caljd.sh -n 1) != $(caljd.sh -n 1 -h -x 6 -x 0) ]]
then
echo "Tomorrow is a holiday or a weeked!!!"
else
echo "It ain't."
fi
The -x 6 and -x 0 says to exclude Saturdays and Sundays respectively.