The Book of Joshua evidently came into being several years after the events recorded in the book took place. A number of statements point to a time of composition beyond the conquest and perhaps beyond the lifetime of Joshua. For example, the phrase "to this day"(4:9; 5:9; 6:25; 7:26; 8:28, 29; 9:27; 13:13; 14:14; 15:63; 16:10) refers to a time considerably after the events referred to happened. How much later is hard to say. These references point to a time of composition many years later than the actual occurrence of the events recorded.2
However the writer claims to have crossed the Jordan River when Israel entered the land (5:1 [marginal reading], 6). Therefore he must have written the book not too long after the conquest. This conclusion finds support in the general impression the reader receives that an eyewitness of the events recorded wrote the book. An editor may or may not have added the account of Joshua's death (24:29-33) to the book later (cf. Deut. 34:10-12). This depends on whether the writer wrote it before or after Joshua died.
According to Jewish tradition Joshua himself wrote the book.3Many modern conservative Old Testament scholars believe that he did.4However other good, conservative scholars believe the writer was not Joshua but a contemporary of his, possibly one of the elders of Israel.5Many more scholars are unsure.6I prefer the traditional view that Joshua wrote the book because I find the arguments of those who believe the writer could not have been Joshua unconvincing.