1. He will be happy.

2. He will have been happy yesterday.
3. He would have been happy yesterday.
---------------------------------
Are they all grammatical?
Is #2 correct? What is the difference between #2 and #3? Does #2 have stronger possibility than #3? Does #3 mean that he was not happy actually.

1 and 3 are fine. They don't mean the same thing, but they are written well.

2 makes no sense because "will have been" is future perfect, but then "yesterday" throws the meaning into past tense.

Let's analyze each sentence to determine their grammaticality and understand their meaning:

1. "He will be happy."
This sentence is grammatically correct. It expresses a future event or state where someone will experience happiness. It does not provide any information about the past.

2. "He will have been happy yesterday."
This sentence is grammatically correct. It uses a future perfect tense to describe a completed action in the past from a future perspective. In this case, it suggests that yesterday, at some point in the past, he will have experienced happiness. However, using the phrase "yesterday" with the future tense is somewhat contradictory because "yesterday" refers to a time in the past. So, while this sentence is grammatically correct, it might be better to rephrase it to avoid confusion.

3. "He would have been happy yesterday."
This sentence is grammatically correct. It uses the conditional perfect tense to express a hypothetical situation in the past. It suggests that if certain conditions had been met, he would have experienced happiness yesterday. It implies that he did not actually experience happiness yesterday.

The main difference between sentence #2 and #3 is the verb tense used. #2 uses the future perfect tense, indicating that the happiness occurs in the past relative to a future time, while #3 uses the conditional perfect tense, indicating a hypothetical situation in the past.

In terms of possibility, both sentences express hypothetical or potential situations. However, #2 can be seen as more certain because it discusses a completed action in the past from a future perspective, while #3 presents a hypothetical scenario that did not actually happen.