If one sees a job advertisement published on day D, how much time after is the maximal number of days is a good idea to apply for the job?

I sometimes see interesting job ads, but I don't apply because I think it was past much time since the ad became public.