Lars Magne Ingebrigtsen | 1 Jul 2012 12:13
Face
Picon
Favicon

Re: How to compare time of last file modification?

Thorsten Jolitz <tjolitz <at> googlemail.com> writes:

> If I want to compare the time of last modification of two files - how do
> I do that, using these two integers? 

Use `time-less-p':

time-less-p is a compiled Lisp function in `time-date.el'.

(time-less-p T1 T2)

Return non-nil if time value T1 is earlier than time value T2.

--

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/

Thorsten Jolitz | 1 Jul 2012 19:26

Re: How to compare time of last file modification?

Lars Magne Ingebrigtsen <lmi <at> gnus.org> writes:

> Thorsten Jolitz <tjolitz <at> googlemail.com> writes:
>
>> If I want to compare the time of last modification of two files - how do
>> I do that, using these two integers? 
>
> Use `time-less-p':
>
> time-less-p is a compiled Lisp function in `time-date.el'.
>
> (time-less-p T1 T2)
>
> Return non-nil if time value T1 is earlier than time value T2.

Thanks to everybody for several solutions. 
Is there a reason to prefer time-less-p or the custom-made solutions
over file-newer-than-file-p?

--

-- 
cheers,
Thorsten


Gmane