Re: Comparing time in Linux
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 23 Dec 2005 09:33:18 +0100
Binary wrote:
Hi,
Any command or script to compare the date/time in Linux? I want to know a date is later or ealier than another. Such as 2005/10/10 > 2004/11/21?
Apart from the mktime() approach this other person ("say88") suggests, you could also just build a non-consecutive day-number:
(year * 12 + month - 1) * 31 + day - 1
This will still fit in 32 bits for quite some time.
-- Josef Möllers (Pinguinpfleger bei FSC) If failure had no penalty success would not be a prize -- T. Pratchett
.
- Follow-Ups:
- Re: Comparing time in Linux
- From: "Nils O. Selåsdal"
- Re: Comparing time in Linux
- References:
- Comparing time in Linux
- From: Binary
- Comparing time in Linux
- Prev by Date: Re: How GNOME terminal works
- Next by Date: Re: Comparing time in Linux
- Previous by thread: Comparing time in Linux
- Next by thread: Re: Comparing time in Linux
- Index(es):
Relevant Pages
|