Solved

Dates

Posted on 1999-01-24
3
216 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 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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 …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now