Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dates

Posted on 1999-01-24
3
Medium Priority
?
231 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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
bertvermeerbergen earned 100 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 85

Expert Comment

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

Expert Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month10 days, 5 hours left to enroll

926 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