Solved

Dates

Posted on 1999-01-24
3
225 Views
Last Modified: 2010-04-21
How do you find a date in time?
example: day of the week for april 11, 1982
0
Comment
Question by:Rossman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
bertvermeerbergen earned 50 total points
ID: 2009404
Supposing you are using C, check out the man pages for mktime() and gmtime() or localtime().  This first lets you initialize a structure with a given date, while the other two use this structure to calculate the day of week, among other things.
If you need a shell script solution, this could be a lot harder to do unless you call a small C program that does the conversion for you.
0
 
LVL 84

Expert Comment

by:ozo
ID: 2009405
cal 4 1982
0
 
LVL 84

Expert Comment

by:ozo
ID: 2009406
perl -MDate::Manip -e 'print UnixDate(ParseDate(\@ARGV),"%A")' april 11, 1982
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question