Star formation histories of irregular galaxies