In a similar way to
のように,
まい~のように states that something is happening ‘in the manner/way of (A)’. まい means ‘every’ (coming from the kanji 毎(まい)), and will always be followed by (A). (A) being a word that expresses some kind of measurement (usually time).
まい~のように is often translated as ‘almost every (A)’, ‘nearly every (A)’, or ‘on an (A) basis’.
-
毎(まい)日(にち)のようにポテトチップス食(た)べてるから太(ふと)ってきた。
Because I eat potato chips almost everyday, I am starting to gain weight.
-
渋谷(しぶや)には毎(まい)週(しゅう)のように行(い)っているよ。
I go to Shibuya almost every week.
-
彼(かれ)は八月(はちがつ)になると毎(まい)年(とし)のように平和記念資料館(へいわきねんしりょうかん)へ行(い)く。
When August comes, he goes to the peace memorial museum almost every year.
Because
よう (from the kanji 様(よう)) usually expresses the ‘manner’ in which something is existing/happening, this phrase literally highlights that something occurs ‘in the manner of every (A)’, and is therefore up to the interpretation of the listener as to whether the speaker means ‘every’, or ‘almost every’.
Although みたいに and のように are regularly interchangeable, that is not the case with まい~のように. This is because みたいだ is originally an abbreviation of the more formal phrase を見たような, and therefore can sound unnatural when used to describe things that cannot be seen, like time.